Make WordPress Core


Ignore:
Timestamp:
09/26/2017 08:53:20 AM (9 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/WPTheme.php

    r40564 r41601  
    141141        }
    142142
     143        /**
     144         * @ticket 40820
     145         */
     146        function test_child_theme_with_itself_as_parent_should_appear_as_broken() {
     147                $theme = new WP_Theme( 'child-parent-itself', $this->theme_root );
     148                $errors = $theme->errors();
     149                $this->assertWPError( $errors );
     150                $this->assertEquals( 'theme_child_invalid', $errors->get_error_code() );
     151        }
     152
    143153
    144154        /**
Note: See TracChangeset for help on using the changeset viewer.