From 4e10a092d1743df7525cb71bbe9582c0876e140e Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Thu, 12 Dec 2013 00:36:27 +0000 Subject: [PATCH] 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 --- tests/phpunit/tests/theme.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/phpunit/tests/theme.php b/tests/phpunit/tests/theme.php index 5e937cffab..68222702fa 100644 --- a/tests/phpunit/tests/theme.php +++ b/tests/phpunit/tests/theme.php @@ -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