WordPress.org

Make WordPress Core


Ignore:
Timestamp:
10/21/2016 11:02:37 AM (4 years ago)
Author:
pento
Message:

Tests: Use a minimal theme for tests.

New default themes require workarounds being added to several unit tests, as they often alter default WordPress behaviour. To avoid ongoing maintenance issues, this change switches to a minimal theme when running tests.

This change also removes the old workarounds for default themes.

Fixes #31550.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/customize/widgets.php

    r38850 r38858  
    4040        $this->assertArrayHasKey( 2, $widget_categories );
    4141        $this->assertEquals( '', $widget_categories[2]['title'] );
    42 
    43         // @todo We should not be including a theme anyway
    44         remove_action( 'after_setup_theme', 'twentyfifteen_setup' );
    45         remove_action( 'after_setup_theme', 'twentysixteen_setup' );
    46         remove_action( 'customize_register', 'twentysixteen_customize_register', 11 );
    47         remove_action( 'after_setup_theme', 'twentyseventeen_setup' );
    48         remove_action( 'customize_register', 'twentyseventeen_customize_register' );
    4942
    5043        $this->backup_registered_sidebars = $GLOBALS['wp_registered_sidebars'];
Note: See TracChangeset for help on using the changeset viewer.