Skip to content
Snippets Groups Projects

Fix fatal in test run under PHP 8

Merged Erick Hitter requested to merge fix/test into master
1 file
+ 3
4
Compare changes
  • Side-by-side
  • Inline
  • 5785a60e
    Fix fatal in test run under PHP 8 · 5785a60e
    Erick Hitter authored
    ```
    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
    ```
@@ -36,11 +36,10 @@ class PostFilters extends WP_UnitTestCase {
/**
* Prepare data for tests.
*
* Not using `setUp` because Yoast polyfills add a return type for PHP 8
* that isn't supported before PHP 7.1.
*/
protected function set_up() {
public function set_up() {
parent::set_up();
static::$post_id = $this->factory->post->create(
array(
'post_title' => 'Pagination Test',
Loading