diff --git a/src/wp-includes/widgets/class-wp-widget-text.php b/src/wp-includes/widgets/class-wp-widget-text.php index 912c6181bb..2f43df3bea 100644 --- a/src/wp-includes/widgets/class-wp-widget-text.php +++ b/src/wp-includes/widgets/class-wp-widget-text.php @@ -360,7 +360,11 @@ class WP_Widget_Text extends WP_Widget {
diff --git a/tests/phpunit/tests/widgets/text-widget.php b/tests/phpunit/tests/widgets/text-widget.php index c65e2e0f5c..41aadb6af7 100644 --- a/tests/phpunit/tests/widgets/text-widget.php +++ b/tests/phpunit/tests/widgets/text-widget.php @@ -457,7 +457,7 @@ class Test_WP_Widget_Text extends WP_UnitTestCase { $widget->form( $instance ); $form = ob_get_clean(); $this->assertContains( 'class="visual" type="hidden" value=""', $form ); - $this->assertNotContains( 'class="visual" type="hidden" value="1"', $form ); + $this->assertNotContains( 'class="visual" type="hidden" value="on"', $form ); $instance = array( 'title' => 'Title', @@ -468,7 +468,7 @@ class Test_WP_Widget_Text extends WP_UnitTestCase { ob_start(); $widget->form( $instance ); $form = ob_get_clean(); - $this->assertContains( 'class="visual" type="hidden" value="1"', $form ); + $this->assertContains( 'class="visual" type="hidden" value="on"', $form ); $this->assertNotContains( 'class="visual" type="hidden" value=""', $form ); $instance = array( @@ -480,7 +480,7 @@ class Test_WP_Widget_Text extends WP_UnitTestCase { ob_start(); $widget->form( $instance ); $form = ob_get_clean(); - $this->assertContains( 'class="visual" type="hidden" value="1"', $form ); + $this->assertContains( 'class="visual" type="hidden" value="on"', $form ); $this->assertNotContains( 'class="visual" type="hidden" value=""', $form ); $instance = array( @@ -493,7 +493,7 @@ class Test_WP_Widget_Text extends WP_UnitTestCase { ob_start(); $widget->form( $instance ); $form = ob_get_clean(); - $this->assertContains( 'class="visual" type="hidden" value="1"', $form ); + $this->assertContains( 'class="visual" type="hidden" value="on"', $form ); $this->assertNotContains( 'class="visual" type="hidden" value=""', $form ); }