Changeset 51335
- Timestamp:
- 07/06/2021 12:25:53 PM (3 years ago)
- Location:
- trunk/tests/phpunit
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/includes/abstract-testcase.php
r51135 r51335 761 761 */ 762 762 public function assertNonEmptyMultidimensionalArray( $array ) { 763 $this->assert True( is_array( $array ));763 $this->assertIsArray( $array ); 764 764 $this->assertNotEmpty( $array ); 765 765 766 766 foreach ( $array as $sub_array ) { 767 $this->assert True( is_array( $sub_array ));767 $this->assertIsArray( $sub_array ); 768 768 $this->assertNotEmpty( $sub_array ); 769 769 } -
trunk/tests/phpunit/tests/admin/includesPlugin.php
r50443 r51335 28 28 ); 29 29 30 $this->assert True( is_array( $data ));30 $this->assertIsArray( $data ); 31 31 32 32 foreach ( $default_headers as $name => $value ) { -
trunk/tests/phpunit/tests/import/parser.php
r49033 r51335 59 59 $result = $parser->parse( $file ); 60 60 61 $this->assert True( is_array( $result ), $message );61 $this->assertIsArray( $result, $message ); 62 62 $this->assertSame( 'http://localhost/', $result['base_url'], $message ); 63 63 $this->assertEquals( … … 152 152 $result = $parser->parse( $file ); 153 153 154 $this->assert True( is_array( $result ), $message );154 $this->assertIsArray( $result, $message ); 155 155 $this->assertSame( 'http://localhost/', $result['base_url'], $message ); 156 156 $this->assertSame( $result['categories'][0]['category_nicename'], 'alpha', $message ); -
trunk/tests/phpunit/tests/rest-api/rest-schema-setup.php
r51021 r51335 73 73 $routes = rest_get_server()->get_routes(); 74 74 75 $this->assert True( is_array( $routes ), '`get_routes` should return an array.' );75 $this->assertIsArray( $routes, '`get_routes` should return an array.' ); 76 76 $this->assertTrue( ! empty( $routes ), 'Routes should not be empty.' ); 77 77 -
trunk/tests/phpunit/tests/taxonomy.php
r51331 r51335 29 29 // Should return an object with the correct taxonomy object type. 30 30 $this->assertTrue( is_object( $tax ) ); 31 $this->assert True( is_array( $tax->object_type ));31 $this->assertIsArray( $tax->object_type ); 32 32 $this->assertSame( array( 'post' ), $tax->object_type ); 33 33 } … … 111 111 // Should return an object with the correct taxonomy object type. 112 112 $this->assertTrue( is_object( $tax ) ); 113 $this->assert True( is_array( $tax->object_type ));113 $this->assertIsArray( $tax->object_type ); 114 114 $this->assertSame( array( 'link' ), $tax->object_type ); 115 115 } -
trunk/tests/phpunit/tests/term/getTheTerms.php
r51331 r51335 249 249 wp_defer_term_counting( false ); 250 250 251 $this->assert True( is_array( $terms ));251 $this->assertIsArray( $terms ); 252 252 $this->assertSame( array( $term_id ), wp_list_pluck( $terms, 'term_id' ) ); 253 253 } … … 284 284 wp_defer_term_counting( false ); 285 285 286 $this->assert True( is_array( $terms ));286 $this->assertIsArray( $terms ); 287 287 $this->assertSame( array( $term_ids[1] ), wp_list_pluck( $terms, 'term_id' ) ); 288 288 } -
trunk/tests/phpunit/tests/theme.php
r49220 r51335 146 146 147 147 // Template files should all exist. 148 $this->assert True( is_array( $theme['Template Files'] ));149 $this->assert True( count( $theme['Template Files'] ) > 0);148 $this->assertIsArray( $theme['Template Files'] ); 149 $this->assertNotEmpty( $theme['Template Files'] ); 150 150 foreach ( $theme['Template Files'] as $file ) { 151 151 $this->assertTrue( is_file( $dir . $file ) ); … … 154 154 155 155 // CSS files should all exist. 156 $this->assert True( is_array( $theme['Stylesheet Files'] ));157 $this->assert True( count( $theme['Stylesheet Files'] ) > 0);156 $this->assertIsArray( $theme['Stylesheet Files'] ); 157 $this->assertNotEmpty( $theme['Stylesheet Files'] ); 158 158 foreach ( $theme['Stylesheet Files'] as $file ) { 159 159 $this->assertTrue( is_file( $dir . $file ) ); -
trunk/tests/phpunit/tests/user.php
r51331 r51335 156 156 157 157 // There is already some stuff in the array. 158 $this->assert True( is_array( get_user_meta( self::$author_id )) );158 $this->assertIsArray( get_user_meta( self::$author_id ) ); 159 159 160 160 foreach ( $vals as $k => $v ) {
Note: See TracChangeset
for help on using the changeset viewer.