- Timestamp:
- 07/05/2021 05:21:53 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/theme/getThemeStarterContent.php
r50968 r51331 143 143 144 144 foreach ( $hydrated_starter_content['widgets']['sidebar-1'] as $widget ) { 145 $this->assertI nternalType( 'array',$widget );145 $this->assertIsArray( $widget ); 146 146 $this->assertCount( 2, $widget ); 147 $this->assertI nternalType( 'string',$widget[0] );148 $this->assertI nternalType( 'array',$widget[1] );147 $this->assertIsString( $widget[0] ); 148 $this->assertIsArray( $widget[1] ); 149 149 $this->assertArrayHasKey( 'title', $widget[1] ); 150 150 } … … 153 153 154 154 foreach ( $hydrated_starter_content['nav_menus']['top']['items'] as $nav_menu_item ) { 155 $this->assertI nternalType( 'array',$nav_menu_item );155 $this->assertIsArray( $nav_menu_item ); 156 156 $this->assertTrue( ! empty( $nav_menu_item['object_id'] ) || ! empty( $nav_menu_item['url'] ) ); 157 157 } … … 159 159 160 160 foreach ( $hydrated_starter_content['posts'] as $key => $post ) { 161 $this->assertI nternalType( 'string',$key );161 $this->assertIsString( $key ); 162 162 $this->assertFalse( is_numeric( $key ) ); 163 $this->assertI nternalType( 'array',$post );163 $this->assertIsArray( $post ); 164 164 $this->assertArrayHasKey( 'post_type', $post ); 165 165 $this->assertArrayHasKey( 'post_title', $post ); … … 201 201 */ 202 202 public function filter_theme_starter_content( $content, $config ) { 203 $this->assertI nternalType( 'array',$config );203 $this->assertIsArray( $config ); 204 204 $this->assertCount( 1, $config['widgets']['sidebar-1'] ); 205 205 $content['widgets']['sidebar-1'][] = array(
Note: See TracChangeset
for help on using the changeset viewer.