From df1362734d8c3360313b8ff36b83db332a8bd87e Mon Sep 17 00:00:00 2001 From: Erick Hitter <git-contrib@ethitter.com> Date: Sat, 11 Jun 2022 14:06:11 -0700 Subject: [PATCH] Fix tests for PHP 8 --- tests/test-admin-callbacks.php | 8 ++++---- tests/test-permalink-filters.php | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/test-admin-callbacks.php b/tests/test-admin-callbacks.php index 8302139..f3073e1 100755 --- a/tests/test-admin-callbacks.php +++ b/tests/test-admin-callbacks.php @@ -65,10 +65,10 @@ class AdminCallbacks extends WP_UnitTestCase { $this->plugin->meta_box( get_post( $this->post_id ) ); $meta_box_contents = ob_get_clean(); - $this->assertContains( 'value="' . $this->nonce . '"', $meta_box_contents ); + $this->assertStringContainsString( 'value="' . $this->nonce . '"', $meta_box_contents ); foreach ( array_keys( $this->plugin->status_codes ) as $code ) { - $this->assertContains( 'value="' . $code . '"', $meta_box_contents ); + $this->assertStringContainsString( 'value="' . $code . '"', $meta_box_contents ); } } @@ -82,7 +82,7 @@ class AdminCallbacks extends WP_UnitTestCase { $this->plugin->action_save_post( $this->post_id ); - $this->assertEquals( static::DESTINATION, get_post_meta( $this->post_id, $this->plugin->meta_key_target, true ) ); - $this->assertEquals( static::TYPE, get_post_meta( $this->post_id, $this->plugin->meta_key_type, true ) ); + $this->assertStringContainsString( static::DESTINATION, get_post_meta( $this->post_id, $this->plugin->meta_key_target, true ) ); + $this->assertStringContainsString( static::TYPE, get_post_meta( $this->post_id, $this->plugin->meta_key_type, true ) ); } } diff --git a/tests/test-permalink-filters.php b/tests/test-permalink-filters.php index 2628400..ea3f2e4 100755 --- a/tests/test-permalink-filters.php +++ b/tests/test-permalink-filters.php @@ -32,7 +32,7 @@ class PermalinkFilters extends WP_UnitTestCase { * Create some objects with redirects. */ public function set_up() { - parent::set_u(); + parent::set_up(); $plugin = external_permalinks_redux::get_instance(); -- GitLab