From 22a7e572370dbe19a475a4e50a2f0f82a1c39b28 Mon Sep 17 00:00:00 2001 From: Erick Hitter <git-contrib@ethitter.com> Date: Sat, 11 Jun 2022 13:07:13 -0700 Subject: [PATCH] Fix fatal in test run under PHP 8 ``` Fatal error: Declaration of PostFilters::setUp() must be compatible with Yoast\PHPUnitPolyfills\TestCases\TestCase::setUp(): void in /builds/wp-plugins/view-all-posts-pages/tests/test-post-filters.php on line 40 ``` --- tests/class-test-case.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/class-test-case.php b/tests/class-test-case.php index 05d9d9f..fbd4b1d 100644 --- a/tests/class-test-case.php +++ b/tests/class-test-case.php @@ -8,6 +8,8 @@ namespace View_All_Posts_Pages\Tests; +use WP_UnitTestCase; + if ( version_compare( phpversion(), '8.0.0', '<' ) ) { /** * Class TestCase. -- GitLab