Skip to content
Snippets Groups Projects
Commit df136273 authored by Erick Hitter's avatar Erick Hitter
Browse files

Fix tests for PHP 8

parent bcd793e5
No related branches found
No related tags found
1 merge request!13Fix tests for PHP 8
Pipeline #4790 failed with stages
in 53 seconds
......@@ -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 ) );
}
}
......@@ -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();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment