From accf884aaca2116c204fbad1696067fa9c18fd8f Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sat, 11 Jul 2020 22:50:36 +0000 Subject: [PATCH] Docs: Correct comments in `tests/formatting/WPSlash.php` per the documentation standards. See #49572. git-svn-id: https://develop.svn.wordpress.org/trunk@48442 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/formatting/WPSlash.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/phpunit/tests/formatting/WPSlash.php b/tests/phpunit/tests/formatting/WPSlash.php index bfe6759535..296dc9c28b 100644 --- a/tests/phpunit/tests/formatting/WPSlash.php +++ b/tests/phpunit/tests/formatting/WPSlash.php @@ -6,14 +6,14 @@ class Tests_Formatting_WPSlash extends WP_UnitTestCase { /** - * @dataProvider data_wp_slash - * * @ticket 42195 * + * @dataProvider data_wp_slash + * * @param string $value * @param string $expected */ - public function test_wp_slash_with( $value, $expected ) { + public function test_wp_slash( $value, $expected ) { $this->assertSame( $expected, wp_slash( $value ) ); } @@ -59,8 +59,8 @@ class Tests_Formatting_WPSlash extends WP_UnitTestCase { $new = "I can\'t see, isn\'t that it?"; $this->assertEquals( $new, wp_slash( $old ) ); $this->assertEquals( "I can\\\\\'t see, isn\\\\\'t that it?", wp_slash( $new ) ); - $this->assertEquals( array( 'a' => $new ), wp_slash( array( 'a' => $old ) ) ); // Keyed array - $this->assertEquals( array( $new ), wp_slash( array( $old ) ) ); // Non-keyed + $this->assertEquals( array( 'a' => $new ), wp_slash( array( 'a' => $old ) ) ); // Keyed array. + $this->assertEquals( array( $new ), wp_slash( array( $old ) ) ); // Non-keyed. } /** @@ -78,9 +78,9 @@ class Tests_Formatting_WPSlash extends WP_UnitTestCase { 'c' => 4, 'd' => 'foo', ); - $arr['e'] = $arr; // Add a sub-array - $this->assertEquals( $arr, wp_slash( $arr ) ); // Keyed array - $this->assertEquals( array_values( $arr ), wp_slash( array_values( $arr ) ) ); // Non-keyed + $arr['e'] = $arr; // Add a sub-array. + $this->assertEquals( $arr, wp_slash( $arr ) ); // Keyed array. + $this->assertEquals( array_values( $arr ), wp_slash( array_values( $arr ) ) ); // Non-keyed. $obj = new stdClass; foreach ( $arr as $k => $v ) { @@ -96,8 +96,8 @@ class Tests_Formatting_WPSlash extends WP_UnitTestCase { $old = 'single\\slash double\\\\slash triple\\\\\\slash'; $new = 'single\\\\slash double\\\\\\\\slash triple\\\\\\\\\\\\slash'; $this->assertEquals( $new, wp_slash( $old ) ); - $this->assertEquals( array( 'a' => $new ), wp_slash( array( 'a' => $old ) ) ); // Keyed array - $this->assertEquals( array( $new ), wp_slash( array( $old ) ) ); // Non-keyed + $this->assertEquals( array( 'a' => $new ), wp_slash( array( 'a' => $old ) ) ); // Keyed array. + $this->assertEquals( array( $new ), wp_slash( array( $old ) ) ); // Non-keyed. } }