Tests: Prevent Twenty Seventeen from interfering with Customizer tests.

This was previously fixed in [38837], but it wasn't really the correct answer, to fix it in the theme. So, [38837] is reverted in this commit, and the Twenty Seventeen actions causing problems are unhooked before tests are run.

See #38372.



git-svn-id: https://develop.svn.wordpress.org/trunk@38850 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Gary Pendergast
2016-10-21 05:27:56 +00:00
parent a8aa7b0ca2
commit 90f8c9314a
10 changed files with 28 additions and 7 deletions
@@ -36,6 +36,9 @@ class Test_WP_Customize_Custom_CSS_Setting extends WP_UnitTestCase {
$this->wp_customize = new WP_Customize_Manager();
$wp_customize = $this->wp_customize;
// Remove default theme actions that interfere with tests
remove_action( 'customize_register', 'twentyseventeen_customize_register' );
do_action( 'customize_register', $this->wp_customize );
$this->setting = new WP_Customize_Custom_CSS_Setting( $this->wp_customize, 'custom_css[twentysixteen]' );
$this->wp_customize->add_setting( $this->setting );