Changeset 39065
- Timestamp:
- 11/01/2016 03:13:27 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/theme.php
r39064 r39065 11 11 protected $default_themes = array( 12 12 'twentyten', 'twentyeleven', 'twentytwelve', 'twentythirteen', 13 'twentyfourteen', 'twentyfifteen', 13 'twentyfourteen', 'twentyfifteen', 'twentysixteen', 'twentyseventeen', 14 14 ); 15 15 … … 188 188 */ 189 189 function test_default_theme_in_default_theme_list() { 190 if ( 'twenty' === substr( WP_DEFAULT_THEME, 0, 6 ) ) { 191 $this->assertContains( WP_DEFAULT_THEME, $this->default_themes ); 192 } 190 $latest_default_theme = WP_Theme::get_core_default_theme(); 191 if ( ! $latest_default_theme->exists() || 'twenty' !== substr( $latest_default_theme->get_stylesheet(), 0, 6 ) ) { 192 $this->markTestSkipped( 'No Twenty* series default themes are installed' ); 193 } 194 $this->assertContains( $latest_default_theme->get_stylesheet(), $this->default_themes ); 193 195 } 194 196 195 197 function test_default_themes_have_textdomain() { 196 198 foreach ( $this->default_themes as $theme ) { 197 $this->assertEquals( $theme, wp_get_theme( $theme )->get( 'TextDomain' ) ); 199 if ( wp_get_theme( $theme )->exists() ) { 200 $this->assertEquals( $theme, wp_get_theme( $theme )->get( 'TextDomain' ) ); 201 } 198 202 } 199 203 }
Note: See TracChangeset
for help on using the changeset viewer.