diff --git a/tests/phpunit/tests/customize/control.php b/tests/phpunit/tests/customize/control.php index dbbfb8a834..4247d9a2ab 100644 --- a/tests/phpunit/tests/customize/control.php +++ b/tests/phpunit/tests/customize/control.php @@ -28,10 +28,8 @@ class Test_WP_Customize_Control extends WP_UnitTestCase { parent::setUp(); wp_set_current_user( $this->factory()->user->create( array( 'role' => 'administrator' ) ) ); require_once( ABSPATH . WPINC . '/class-wp-customize-manager.php' ); - // @codingStandardsIgnoreStart $GLOBALS['wp_customize'] = new WP_Customize_Manager(); - // @codingStandardsIgnoreEnd - $this->wp_customize = $GLOBALS['wp_customize']; + $this->wp_customize = $GLOBALS['wp_customize']; } /** diff --git a/tests/phpunit/tests/customize/partial.php b/tests/phpunit/tests/customize/partial.php index 55a3cf0f62..ebb778003a 100644 --- a/tests/phpunit/tests/customize/partial.php +++ b/tests/phpunit/tests/customize/partial.php @@ -32,10 +32,8 @@ class Test_WP_Customize_Partial extends WP_UnitTestCase { function setUp() { parent::setUp(); require_once( ABSPATH . WPINC . '/class-wp-customize-manager.php' ); - // @codingStandardsIgnoreStart $GLOBALS['wp_customize'] = new WP_Customize_Manager(); - // @codingStandardsIgnoreEnd - $this->wp_customize = $GLOBALS['wp_customize']; + $this->wp_customize = $GLOBALS['wp_customize']; if ( isset( $this->wp_customize->selective_refresh ) ) { $this->selective_refresh = $this->wp_customize->selective_refresh; } diff --git a/tests/phpunit/tests/customize/selective-refresh-ajax.php b/tests/phpunit/tests/customize/selective-refresh-ajax.php index cff45a46b8..4de97dfd87 100644 --- a/tests/phpunit/tests/customize/selective-refresh-ajax.php +++ b/tests/phpunit/tests/customize/selective-refresh-ajax.php @@ -42,10 +42,8 @@ class Test_WP_Customize_Selective_Refresh_Ajax extends WP_UnitTestCase { add_filter( 'wp_die_ajax_handler', array( $this, 'get_wp_die_handler' ), 1, 1 ); require_once( ABSPATH . WPINC . '/class-wp-customize-manager.php' ); - // @codingStandardsIgnoreStart $GLOBALS['wp_customize'] = new WP_Customize_Manager(); - // @codingStandardsIgnoreEnd - $this->wp_customize = $GLOBALS['wp_customize']; + $this->wp_customize = $GLOBALS['wp_customize']; if ( isset( $this->wp_customize->selective_refresh ) ) { $this->selective_refresh = $this->wp_customize->selective_refresh; } diff --git a/tests/phpunit/tests/customize/selective-refresh.php b/tests/phpunit/tests/customize/selective-refresh.php index 03a107cf14..3edeee4170 100644 --- a/tests/phpunit/tests/customize/selective-refresh.php +++ b/tests/phpunit/tests/customize/selective-refresh.php @@ -32,10 +32,8 @@ class Test_WP_Customize_Selective_Refresh extends WP_UnitTestCase { function setUp() { parent::setUp(); require_once( ABSPATH . WPINC . '/class-wp-customize-manager.php' ); - // @codingStandardsIgnoreStart $GLOBALS['wp_customize'] = new WP_Customize_Manager(); - // @codingStandardsIgnoreEnd - $this->wp_customize = $GLOBALS['wp_customize']; + $this->wp_customize = $GLOBALS['wp_customize']; if ( isset( $this->wp_customize->selective_refresh ) ) { $this->selective_refresh = $this->wp_customize->selective_refresh; }