From bba8d6521621b9e414e779f414efe21e57520ce9 Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Tue, 30 Jan 2018 00:33:03 +0000 Subject: [PATCH] Widgets: Fix Text widget unit test which broke due to global scope not being cleaned. Amends [42613]. See #42495. git-svn-id: https://develop.svn.wordpress.org/trunk@42617 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/widgets/text-widget.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/tests/phpunit/tests/widgets/text-widget.php b/tests/phpunit/tests/widgets/text-widget.php index c50cf31e68..c84b24bef4 100644 --- a/tests/phpunit/tests/widgets/text-widget.php +++ b/tests/phpunit/tests/widgets/text-widget.php @@ -29,14 +29,16 @@ class Test_WP_Widget_Text extends WP_UnitTestCase { /** * Clean up global scope. * - * @global WP_Scripts $wp_scripts - * @global WP_Styles $wp_style + * @global WP_Scripts $wp_scripts + * @global WP_Styles $wp_style + * @global WP_Customize_Manager $wp_customize */ function clean_up_global_scope() { - global $wp_scripts, $wp_styles; + global $wp_scripts, $wp_styles, $wp_customize; parent::clean_up_global_scope(); - $wp_scripts = null; - $wp_styles = null; + $wp_scripts = null; + $wp_styles = null; + $wp_customize = null; } /**