diff --git a/tests/phpunit/tests/kses.php b/tests/phpunit/tests/kses.php index 84787a4501..b31f477661 100644 --- a/tests/phpunit/tests/kses.php +++ b/tests/phpunit/tests/kses.php @@ -11,21 +11,21 @@ class Tests_Kses extends WP_UnitTestCase { * @dataProvider data_wp_filter_post_kses_address * @ticket 20210 * - * @param string $string Test string for kses. - * @param string $expect_string Expected result after passing through kses. + * @param string $content Test string for kses. + * @param string $expected Expected result after passing through kses. */ - public function test_wp_filter_post_kses_address( $string, $expect_string ) { + public function test_wp_filter_post_kses_address( $content, $expected ) { global $allowedposttags; - $this->assertSame( $expect_string, wp_kses( $string, $allowedposttags ) ); + $this->assertSame( $expected, wp_kses( $content, $allowedposttags ) ); } /** * Data provider for test_wp_filter_post_kses_address. * * @return array[] Arguments { - * @type string $string Test string for kses. - * @type string $expect_string Expected result after passing through kses. + * @type string $content Test string for kses. + * @type string $expected Expected result after passing through kses. * } */ public function data_wp_filter_post_kses_address() { @@ -45,10 +45,10 @@ class Tests_Kses extends WP_UnitTestCase { foreach ( $attributes as $name => $values ) { foreach ( (array) $values as $value ) { - $string = "
1 WordPress Avenue, The Internet."; - $expect_string = "1 WordPress Avenue, The Internet."; + $content = "1 WordPress Avenue, The Internet."; + $expected = "1 WordPress Avenue, The Internet."; - $data[] = array( $string, $expect_string ); + $data[] = array( $content, $expected ); } } @@ -59,21 +59,21 @@ class Tests_Kses extends WP_UnitTestCase { * @dataProvider data_wp_filter_post_kses_a * @ticket 20210 * - * @param string $string Test string for kses. - * @param string $expect_string Expected result after passing through kses. + * @param string $content Test string for kses. + * @param string $expected Expected result after passing through kses. */ - public function test_wp_filter_post_kses_a( $string, $expect_string ) { + public function test_wp_filter_post_kses_a( $content, $expected ) { global $allowedposttags; - $this->assertSame( $expect_string, wp_kses( $string, $allowedposttags ) ); + $this->assertSame( $expected, wp_kses( $content, $allowedposttags ) ); } /** * Data provider for test_wp_filter_post_kses_a. * * @return array[] Arguments { - * @type string $string Test string for kses. - * @type string $expect_string Expected result after passing through kses. + * @type string $content Test string for kses. + * @type string $expected Expected result after passing through kses. * } */ public function data_wp_filter_post_kses_a() { @@ -100,9 +100,9 @@ class Tests_Kses extends WP_UnitTestCase { $attr = $name; $expected_attr = $name; } - $string = "I link this"; - $expect_string = "I link this"; - $data[] = array( $string, $expect_string ); + $content = "I link this"; + $expected = "I link this"; + $data[] = array( $content, $expected ); } return $data; @@ -120,8 +120,7 @@ class Tests_Kses extends WP_UnitTestCase { * @param string $expected Expected output following KSES parsing. */ public function test_wp_kses_video( $source, $context, $expected ) { - $actual = wp_kses( $source, $context ); - $this->assertSame( $expected, $actual ); + $this->assertSame( $expected, wp_kses( $source, $context ) ); } /** @@ -166,21 +165,21 @@ class Tests_Kses extends WP_UnitTestCase { * @dataProvider data_wp_filter_post_kses_abbr * @ticket 20210 * - * @param string $string Test string for kses. - * @param string $expect_string Expected result after passing through kses. + * @param string $content Test string for kses. + * @param string $expected Expected result after passing through kses. */ - public function test_wp_filter_post_kses_abbr( $string, $expect_string ) { + public function test_wp_filter_post_kses_abbr( $content, $expected ) { global $allowedposttags; - $this->assertSame( $expect_string, wp_kses( $string, $allowedposttags ) ); + $this->assertSame( $expected, wp_kses( $content, $allowedposttags ) ); } /** * Data provider for data_wp_filter_post_kses_abbr. * * @return array[] Arguments { - * @type string $string Test string for kses. - * @type string $expect_string Expected result after passing through kses. + * @type string $content Test string for kses. + * @type string $expected Expected result after passing through kses. * } */ public function data_wp_filter_post_kses_abbr() { @@ -194,9 +193,9 @@ class Tests_Kses extends WP_UnitTestCase { $data = array(); foreach ( $attributes as $name => $value ) { - $string = "WP"; - $expect_string = "WP"; - $data[] = array( $string, $expect_string ); + $content = "WP"; + $expected = "WP"; + $data[] = array( $content, $expected ); } return $data; @@ -535,17 +534,18 @@ EOF; } public function test_hyphenated_tag() { - $string = 'This is a BDO tag. Weird, right?
'; + $content = 'This is a BDO tag. Weird, right?
'; - $this->assertSame( $input, wp_kses( $input, $allowedposttags ) ); + $this->assertSame( $content, wp_kses( $content, $allowedposttags ) ); } /** @@ -873,9 +873,9 @@ EOF; public function test_ruby_tag_allowed() { global $allowedposttags; - $input = '✶'; + $content = '✶'; - $this->assertSame( $input, wp_kses( $input, $allowedposttags ) ); + $this->assertSame( $content, wp_kses( $content, $allowedposttags ) ); } /** @@ -884,9 +884,9 @@ EOF; public function test_ol_reversed_attribute_allowed() { global $allowedposttags; - $input = '