WordPress.org

Make WordPress Core

Changeset 26858


Ignore:
Timestamp:
12/12/2013 12:36:27 AM (8 years ago)
Author:
nacin
Message:

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

fixes #26566.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/theme.php

    r25409 r26858  
    99    protected $theme_slug = 'twentyeleven';
    1010    protected $theme_name = 'Twenty Eleven';
     11    protected $default_themes = array( 'twentyten', 'twentyeleven', 'twentytwelve', 'twentythirteen', 'twentyfourteen' );
    1112
    1213    function setUp() {
     
    162163    }
    163164
     165    function test_default_themes_have_textdomain() {
     166        $this->assertContains( WP_DEFAULT_THEME, $this->default_themes );
     167        foreach ( $this->default_themes as $theme ) {
     168            $this->assertEquals( $theme, wp_get_theme( $theme )->get( 'TextDomain' ) );
     169        }
     170    }
     171
    164172    /**
    165173     * @ticket 20897
Note: See TracChangeset for help on using the changeset viewer.