Changeset 53253 for trunk/tests/phpunit/tests/theme/wpTheme.php
- Timestamp:
- 04/25/2022 09:45:00 AM (4 years ago)
- File:
-
- 1 edited
-
trunk/tests/phpunit/tests/theme/wpTheme.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/theme/wpTheme.php
r52391 r53253 263 263 264 264 /** 265 * Test get_files for an existing theme. 266 * 267 * @ticket 53599 268 */ 269 public function test_get_files_theme() { 270 $theme = new WP_Theme( 'theme1', $this->theme_root ); 271 $files = $theme->get_files(); 272 273 $this->assertIsArray( $files ); 274 $this->assertCount( 3, $files ); 275 $this->assertArrayHasKey( 'functions.php', $files ); 276 $this->assertArrayHasKey( 'index.php', $files ); 277 $this->assertArrayHasKey( 'style.css', $files ); 278 } 279 280 /** 281 * Test get_files for a non-existing theme. 282 * 283 * @ticket 53599 284 */ 285 public function test_get_files_nonexistent_theme() { 286 $theme = new WP_Theme( 'nonexistent', $this->theme_root ); 287 $files = $theme->get_files(); 288 289 $this->assertIsArray( $files ); 290 $this->assertEmpty( $files ); 291 } 292 293 /** 265 294 * Data provider. 266 295 *
Note: See TracChangeset
for help on using the changeset viewer.