diff --git a/tests/phpunit/tests/filesystem/base.php b/tests/phpunit/tests/filesystem/base.php index f186cbb961..54fcb3e1e9 100644 --- a/tests/phpunit/tests/filesystem/base.php +++ b/tests/phpunit/tests/filesystem/base.php @@ -29,7 +29,7 @@ abstract class WP_Filesystem_UnitTestCase extends WP_UnitTestCase { function test_is_MockFS_sane() { global $wp_filesystem; - $this->assertTrue( is_a( $wp_filesystem, 'WP_Filesystem_MockFS' ) ); + $this->assertInstanceOf( 'WP_Filesystem_MockFS', $wp_filesystem ); $wp_filesystem->init( '/' ); diff --git a/tests/phpunit/tests/post/query.php b/tests/phpunit/tests/post/query.php index 686f77a293..6ccf69f534 100644 --- a/tests/phpunit/tests/post/query.php +++ b/tests/phpunit/tests/post/query.php @@ -102,7 +102,7 @@ class Tests_Post_Query extends WP_UnitTestCase { foreach ( $query->posts as $post ) { // Posts are WP_Post objects. - $this->assertTrue( is_a( $post, 'WP_Post' ) ); + $this->assertInstanceOf( 'WP_Post', $post ); // Filters are raw. $this->assertSame( 'raw', $post->filter ); diff --git a/tests/phpunit/tests/sitemaps/functions.php b/tests/phpunit/tests/sitemaps/functions.php index aa4c63cc41..a4913fae5f 100644 --- a/tests/phpunit/tests/sitemaps/functions.php +++ b/tests/phpunit/tests/sitemaps/functions.php @@ -55,7 +55,7 @@ class Test_Sitemaps_Functions extends WP_UnitTestCase { $this->assertSame( array_keys( $expected ), array_keys( $sitemaps ), 'Unable to confirm default sitemap types are registered.' ); foreach ( $expected as $name => $provider ) { - $this->assertTrue( is_a( $sitemaps[ $name ], $provider ), "Default $name sitemap is not a $provider object." ); + $this->assertInstanceOf( $provider, $sitemaps[ $name ], "Default $name sitemap is not a $provider object." ); } } diff --git a/tests/phpunit/tests/taxonomy.php b/tests/phpunit/tests/taxonomy.php index 8e256f8928..241cc26a98 100644 --- a/tests/phpunit/tests/taxonomy.php +++ b/tests/phpunit/tests/taxonomy.php @@ -438,7 +438,7 @@ class Tests_Taxonomy extends WP_UnitTestCase { 'taxonomy' => 'force_error', 'cat_name' => 'Error', ); - $this->assertTrue( is_a( wp_insert_category( $cat, true ), 'WP_Error' ) ); + $this->assertInstanceOf( 'WP_Error', wp_insert_category( $cat, true ) ); } function test_insert_category_force_error_no_handle() {