diff --git a/tests/phpunit/tests/kses.php b/tests/phpunit/tests/kses.php index 2c5a6c6706..37753260e9 100644 --- a/tests/phpunit/tests/kses.php +++ b/tests/phpunit/tests/kses.php @@ -16,17 +16,21 @@ class Tests_Kses extends WP_UnitTestCase { $attributes = array( 'class' => 'classname', 'id' => 'id', - 'style' => 'color: red;', - 'style' => 'color: red', - 'style' => 'color: red; text-align:center', - 'style' => 'color: red; text-align:center;', + 'style' => array( + 'color: red;', + 'color: red', + 'color: red; text-align:center', + 'color: red; text-align:center;', + ), 'title' => 'title', ); - foreach ( $attributes as $name => $value ) { - $string = "
1 WordPress Avenue, The Internet.
"; - $expect_string = "
1 WordPress Avenue, The Internet.
"; - $this->assertEquals( $expect_string, wp_kses( $string, $allowedposttags ) ); + foreach ( $attributes as $name => $values ) { + foreach ( (array) $values as $value ) { + $string = "
1 WordPress Avenue, The Internet.
"; + $expect_string = "
1 WordPress Avenue, The Internet.
"; + $this->assertEquals( $expect_string, wp_kses( $string, $allowedposttags ) ); + } } }