Add unit test to verify all bundled themes have valid text domain declared.

fixes #26566.


git-svn-id: https://develop.svn.wordpress.org/trunk@26858 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2013-12-12 00:36:27 +00:00
parent a624005b8d
commit 4e10a092d1
1 changed files with 8 additions and 0 deletions

View File

@ -8,6 +8,7 @@
class Tests_Theme extends WP_UnitTestCase {
protected $theme_slug = 'twentyeleven';
protected $theme_name = 'Twenty Eleven';
protected $default_themes = array( 'twentyten', 'twentyeleven', 'twentytwelve', 'twentythirteen', 'twentyfourteen' );
function setUp() {
parent::setUp();
@ -161,6 +162,13 @@ class Tests_Theme extends WP_UnitTestCase {
$this->assertEquals( content_url( 'themes/' . $this->theme_slug ), $theme->get_template_directory_uri(), 'get_template_directory_uri' );
}
function test_default_themes_have_textdomain() {
$this->assertContains( WP_DEFAULT_THEME, $this->default_themes );
foreach ( $this->default_themes as $theme ) {
$this->assertEquals( $theme, wp_get_theme( $theme )->get( 'TextDomain' ) );
}
}
/**
* @ticket 20897
* @expectedDeprecated get_theme_data