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:
parent
a624005b8d
commit
4e10a092d1
@ -8,6 +8,7 @@
|
|||||||
class Tests_Theme extends WP_UnitTestCase {
|
class Tests_Theme extends WP_UnitTestCase {
|
||||||
protected $theme_slug = 'twentyeleven';
|
protected $theme_slug = 'twentyeleven';
|
||||||
protected $theme_name = 'Twenty Eleven';
|
protected $theme_name = 'Twenty Eleven';
|
||||||
|
protected $default_themes = array( 'twentyten', 'twentyeleven', 'twentytwelve', 'twentythirteen', 'twentyfourteen' );
|
||||||
|
|
||||||
function setUp() {
|
function setUp() {
|
||||||
parent::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' );
|
$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
|
* @ticket 20897
|
||||||
* @expectedDeprecated get_theme_data
|
* @expectedDeprecated get_theme_data
|
||||||
|
Loading…
Reference in New Issue
Block a user