Changeset 59227
- Timestamp:
- 10/14/2024 01:05:09 AM (3 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/theme.php
r59186 r59227 215 215 /** 216 216 * Tests the default themes list in the test suite matches the runtime default themes. 217 * 218 * @ticket 62103 219 * 220 * @coversNothing 217 221 */ 218 222 public function test_default_default_theme_list_match_in_test_suite_and_at_runtime() { … … 234 238 /** 235 239 * Test the default theme in WP_Theme matches the WP_DEFAULT_THEME constant. 240 * 241 * @ticket 62103 242 * 243 * @covers WP_Theme::get_core_default_theme 236 244 */ 237 245 public function test_default_theme_matches_constant() { … … 249 257 250 258 $this->assertSame( $wp_default_theme_constant, $latest_default_theme->get_stylesheet(), 'WP_DEFAULT_THEME should match the latest default theme.' ); 259 } 260 261 /** 262 * Ensure that the default themes are included in the new bundled files. 263 * 264 * @ticket 62103 265 * 266 * @coversNothing 267 * 268 * @runInSeparateProcess 269 * @preserveGlobalState disabled 270 */ 271 public function test_default_themes_are_included_in_new_files() { 272 require_once ABSPATH . 'wp-admin/includes/update-core.php'; 273 global $_new_bundled_files; 274 // Limit new bundled files to the default themes. 275 $new_theme_files = array_keys( $_new_bundled_files ); 276 $new_theme_files = array_filter( 277 $new_theme_files, 278 static function ( $file ) { 279 return str_starts_with( $file, 'themes/' ); 280 } 281 ); 282 283 $tested_themes = $this->default_themes; 284 // Convert the tested themes to directory names. 285 $tested_themes = array_map( 286 static function ( $theme ) { 287 return "themes/{$theme}/"; 288 }, 289 $tested_themes 290 ); 291 292 $this->assertSameSets( $tested_themes, $new_theme_files, 'New bundled files should include the default themes.' ); 251 293 } 252 294
Note: See TracChangeset
for help on using the changeset viewer.