WordPress.org

Make WordPress Core


Ignore:
Timestamp:
09/26/2017 08:53:20 AM (2 years ago)
Author:
swissspidy
Message:

Themes: Report theme as broken that sets itself as its parent.

Props davilera.
Fixes #40820.

File:
1 edited

Legend:

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

    r39173 r41601  
    176176     */
    177177    function test_broken_themes() {
    178         $themes = get_themes();
    179         $expected = array('broken-theme' => array('Name' => 'broken-theme', 'Title' => 'broken-theme', 'Description' => __('Stylesheet is missing.')));
     178        $themes   = get_themes();
     179
     180        $expected = array(
     181            'broken-theme'           => array(
     182                'Name'        => 'broken-theme',
     183                'Title'       => 'broken-theme',
     184                'Description' => __( 'Stylesheet is missing.' ),
     185            ),
     186            'Child and Parent Theme' => array(
     187                'Name'        => 'Child and Parent Theme',
     188                'Title'       => 'Child and Parent Theme',
     189                'Description' => sprintf( __( 'The theme defines itself as its parent theme. Please check the "%s" header.' ), 'Template' ),
     190            ),
     191        );
    180192
    181193        $this->assertEquals($expected, get_broken_themes() );
Note: See TracChangeset for help on using the changeset viewer.