diff --git a/tests/phpunit/tests/customize/widgets.php b/tests/phpunit/tests/customize/widgets.php index b5abb2dab73ad..68d8945874bc1 100644 --- a/tests/phpunit/tests/customize/widgets.php +++ b/tests/phpunit/tests/customize/widgets.php @@ -436,7 +436,7 @@ function test_wp_widget_form_customize_control_json() { $this->assertArrayHasKey( 'sidebar_id', $params ); $this->assertArrayHasKey( 'width', $params ); $this->assertArrayHasKey( 'height', $params ); - $this->assertInternalType( 'bool', $params['is_wide'] ); + $this->assertIsBool( $params['is_wide'] ); } /** diff --git a/tests/phpunit/tests/rest-api/rest-post-meta-fields.php b/tests/phpunit/tests/rest-api/rest-post-meta-fields.php index cd73a83e22517..ae2a13ace6db3 100644 --- a/tests/phpunit/tests/rest-api/rest-post-meta-fields.php +++ b/tests/phpunit/tests/rest-api/rest-post-meta-fields.php @@ -403,7 +403,7 @@ public function test_get_value_types() { $this->assertSame( 42.0, $meta['test_number'] ); $this->assertArrayHasKey( 'test_bool', $meta ); - $this->assertInternalType( 'boolean', $meta['test_bool'] ); + $this->assertIsBool( $meta['test_bool'] ); $this->assertSame( true, $meta['test_bool'] ); } diff --git a/tests/phpunit/tests/rest-api/rest-term-meta-fields.php b/tests/phpunit/tests/rest-api/rest-term-meta-fields.php index 9e882e9bd1d30..c99a9092eef1f 100644 --- a/tests/phpunit/tests/rest-api/rest-term-meta-fields.php +++ b/tests/phpunit/tests/rest-api/rest-term-meta-fields.php @@ -350,7 +350,7 @@ public function test_get_value_types() { $this->assertSame( 42.0, $meta['test_number'] ); $this->assertArrayHasKey( 'test_bool', $meta ); - $this->assertInternalType( 'boolean', $meta['test_bool'] ); + $this->assertIsBool( $meta['test_bool'] ); $this->assertSame( true, $meta['test_bool'] ); } diff --git a/tests/phpunit/tests/xmlrpc/mw/getPost.php b/tests/phpunit/tests/xmlrpc/mw/getPost.php index 2c9c66039b719..2877b1da7eb29 100644 --- a/tests/phpunit/tests/xmlrpc/mw/getPost.php +++ b/tests/phpunit/tests/xmlrpc/mw/getPost.php @@ -72,7 +72,7 @@ function test_valid_post() { $this->assertInternalType( 'string', $result['post_status'] ); $this->assertIsArray( $result['custom_fields'] ); $this->assertInternalType( 'string', $result['wp_post_format'] ); - $this->assertInternalType( 'bool', $result['sticky'] ); + $this->assertIsBool( $result['sticky'] ); $post_data = get_post( self::$post_id ); diff --git a/tests/phpunit/tests/xmlrpc/wp/deleteTerm.php b/tests/phpunit/tests/xmlrpc/wp/deleteTerm.php index 40601246c22b2..3c0a14f431726 100644 --- a/tests/phpunit/tests/xmlrpc/wp/deleteTerm.php +++ b/tests/phpunit/tests/xmlrpc/wp/deleteTerm.php @@ -70,6 +70,6 @@ function test_term_deleted() { $result = $this->myxmlrpcserver->wp_deleteTerm( array( 1, 'editor', 'editor', 'category', self::$term_id ) ); $this->assertNotIXRError( $result ); - $this->assertInternalType( 'boolean', $result ); + $this->assertIsBool( $result ); } } diff --git a/tests/phpunit/tests/xmlrpc/wp/editTerm.php b/tests/phpunit/tests/xmlrpc/wp/editTerm.php index bea3dde304c18..94b72ab7a3ad8 100644 --- a/tests/phpunit/tests/xmlrpc/wp/editTerm.php +++ b/tests/phpunit/tests/xmlrpc/wp/editTerm.php @@ -155,7 +155,7 @@ function test_parent_null() { ); $this->assertNotIXRError( $result ); - $this->assertInternalType( 'boolean', $result ); + $this->assertIsBool( $result ); $term = get_term( self::$child_term, 'category' ); $this->assertEquals( '0', $term->parent ); @@ -236,7 +236,7 @@ function test_edit_all_fields() { $result = $this->myxmlrpcserver->wp_editTerm( array( 1, 'editor', 'editor', self::$child_term, $fields ) ); $this->assertNotIXRError( $result ); - $this->assertInternalType( 'boolean', $result ); + $this->assertIsBool( $result ); } /** diff --git a/tests/phpunit/tests/xmlrpc/wp/getPost.php b/tests/phpunit/tests/xmlrpc/wp/getPost.php index 06fa1e47418f7..c3c0f5d63f048 100644 --- a/tests/phpunit/tests/xmlrpc/wp/getPost.php +++ b/tests/phpunit/tests/xmlrpc/wp/getPost.php @@ -58,7 +58,7 @@ function test_valid_post() { $this->assertInternalType( 'string', $result['link'] ); $this->assertInternalType( 'string', $result['comment_status'] ); $this->assertInternalType( 'string', $result['ping_status'] ); - $this->assertInternalType( 'bool', $result['sticky'] ); + $this->assertIsBool( $result['sticky'] ); $this->assertInternalType( 'string', $result['post_format'] ); $this->assertIsArray( $result['post_thumbnail'] ); $this->assertIsArray( $result['custom_fields'] ); diff --git a/tests/phpunit/tests/xmlrpc/wp/getPostType.php b/tests/phpunit/tests/xmlrpc/wp/getPostType.php index 5c126e67a34e5..5ba177db88a1e 100644 --- a/tests/phpunit/tests/xmlrpc/wp/getPostType.php +++ b/tests/phpunit/tests/xmlrpc/wp/getPostType.php @@ -67,12 +67,12 @@ function test_valid_type() { // Check data types. $this->assertInternalType( 'string', $result['name'] ); $this->assertInternalType( 'string', $result['label'] ); - $this->assertInternalType( 'bool', $result['hierarchical'] ); - $this->assertInternalType( 'bool', $result['public'] ); - $this->assertInternalType( 'bool', $result['_builtin'] ); - $this->assertInternalType( 'bool', $result['map_meta_cap'] ); - $this->assertInternalType( 'bool', $result['has_archive'] ); - $this->assertInternalType( 'bool', $result['show_ui'] ); + $this->assertIsBool( $result['hierarchical'] ); + $this->assertIsBool( $result['public'] ); + $this->assertIsBool( $result['_builtin'] ); + $this->assertIsBool( $result['map_meta_cap'] ); + $this->assertIsBool( $result['has_archive'] ); + $this->assertIsBool( $result['show_ui'] ); $this->assertInternalType( 'int', $result['menu_position'] ); $this->assertInternalType( 'string', $result['menu_icon'] ); $this->assertIsArray( $result['labels'] ); @@ -120,7 +120,7 @@ function test_valid_type() { // Check support data types. foreach ( $result['supports'] as $key => $value ) { $this->assertInternalType( 'string', $key ); - $this->assertInternalType( 'bool', $value ); + $this->assertIsBool( $value ); } // Check expected values.