diff --git a/tests/phpunit/tests/kses.php b/tests/phpunit/tests/kses.php
index 2c5a6c6706..0c45a853a2 100644
a
|
b
|
class Tests_Kses extends WP_UnitTestCase { |
16 | 16 | $attributes = array( |
17 | 17 | 'class' => 'classname', |
18 | 18 | 'id' => 'id', |
19 | | 'style' => 'color: red;', |
20 | | 'style' => 'color: red', |
21 | | 'style' => 'color: red; text-align:center', |
22 | | 'style' => 'color: red; text-align:center;', |
23 | 19 | 'title' => 'title', |
24 | 20 | ); |
25 | 21 | |
… |
… |
class Tests_Kses extends WP_UnitTestCase { |
28 | 24 | $expect_string = "<address $name='" . str_replace( '; ', ';', trim( $value, ';' ) ) . "'>1 WordPress Avenue, The Internet.</address>"; |
29 | 25 | $this->assertEquals( $expect_string, wp_kses( $string, $allowedposttags ) ); |
30 | 26 | } |
| 27 | |
| 28 | $style_attributes = array( |
| 29 | 'color: red;', |
| 30 | 'color: red', |
| 31 | 'color: red; text-align:center', |
| 32 | 'color: red; text-align:center;', |
| 33 | ); |
| 34 | |
| 35 | foreach ( $style_attributes as $value ) { |
| 36 | $string = "<address style='$value'>1 WordPress Avenue, The Internet.</address>"; |
| 37 | $expect_string = "<address style='" . str_replace( '; ', ';', trim( $value, ';' ) ) . "'>1 WordPress Avenue, The Internet.</address>"; |
| 38 | $this->assertEquals( $expect_string, wp_kses( $string, $allowedposttags ) ); |
| 39 | } |
31 | 40 | } |
32 | 41 | |
33 | 42 | /** |