mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-28 13:00:19 +00:00
Themes: Report theme as broken that sets itself as its parent.
Props davilera. Fixes #40820. git-svn-id: https://develop.svn.wordpress.org/trunk@41601 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -175,8 +175,20 @@ class Tests_Theme_ThemeDir extends WP_UnitTestCase {
|
||||
* @expectedDeprecated get_broken_themes
|
||||
*/
|
||||
function test_broken_themes() {
|
||||
$themes = get_themes();
|
||||
$expected = array('broken-theme' => array('Name' => 'broken-theme', 'Title' => 'broken-theme', 'Description' => __('Stylesheet is missing.')));
|
||||
$themes = get_themes();
|
||||
|
||||
$expected = array(
|
||||
'broken-theme' => array(
|
||||
'Name' => 'broken-theme',
|
||||
'Title' => 'broken-theme',
|
||||
'Description' => __( 'Stylesheet is missing.' ),
|
||||
),
|
||||
'Child and Parent Theme' => array(
|
||||
'Name' => 'Child and Parent Theme',
|
||||
'Title' => 'Child and Parent Theme',
|
||||
'Description' => sprintf( __( 'The theme defines itself as its parent theme. Please check the "%s" header.' ), 'Template' ),
|
||||
),
|
||||
);
|
||||
|
||||
$this->assertEquals($expected, get_broken_themes() );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user