From 7a96aefac6b615eba3799757fe8dac6325992da1 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Mon, 21 Feb 2022 14:50:07 +0000 Subject: [PATCH] Docs: Use third-person singular verbs in some test descriptions in `phpunit/tests/functions/`. Follow-up to [42971], [45371], [46159], [46175], [47779], [50962], [50964], [51910], [52778]. Props azouamauriac, SergeyBiryukov. See #54725. git-svn-id: https://develop.svn.wordpress.org/trunk@52780 602fd350-edb4-49c9-b593-d223f7449a82 --- .../phpunit/tests/functions/anonymization.php | 22 +++++++++---------- .../tests/functions/cleanDirsizeCache.php | 8 +++---- .../tests/functions/cleanupHeaderComment.php | 4 ++-- tests/phpunit/tests/functions/doEnclose.php | 6 ++--- tests/phpunit/tests/functions/wpArrayGet.php | 12 +++++----- tests/phpunit/tests/functions/wpArraySet.php | 6 ++--- .../tests/functions/wpArraySliceAssoc.php | 4 ++-- .../phpunit/tests/functions/wpToKebabCase.php | 2 +- .../tests/functions/wpValidateBoolean.php | 2 +- 9 files changed, 33 insertions(+), 33 deletions(-) diff --git a/tests/phpunit/tests/functions/anonymization.php b/tests/phpunit/tests/functions/anonymization.php index b0dfafa528..3e0cea6fa7 100644 --- a/tests/phpunit/tests/functions/anonymization.php +++ b/tests/phpunit/tests/functions/anonymization.php @@ -19,7 +19,7 @@ class Tests_Functions_Anonymization extends WP_UnitTestCase { /** - * Test that wp_privacy_anonymize_ip() properly anonymizes all possible IP address formats. + * Tests that wp_privacy_anonymize_ip() properly anonymizes all possible IP address formats. * * @dataProvider data_wp_privacy_anonymize_ip * @@ -40,7 +40,7 @@ class Tests_Functions_Anonymization extends WP_UnitTestCase { } /** - * Provide test cases for `test_wp_privacy_anonymize_ip()`. + * Data provider for `test_wp_privacy_anonymize_ip()`. * * @since 4.9.6 Moved from `Test_WP_Community_Events::data_get_unsafe_client_ip_anonymization()`. * @@ -175,7 +175,7 @@ class Tests_Functions_Anonymization extends WP_UnitTestCase { } /** - * Test that wp_privacy_anonymize_ip() properly anonymizes all possible IP address formats. + * Tests that wp_privacy_anonymize_ip() properly anonymizes all possible IP address formats. * * @dataProvider data_wp_privacy_anonymize_ip_with_inet_dependency * @@ -194,7 +194,7 @@ class Tests_Functions_Anonymization extends WP_UnitTestCase { } /** - * Provide test cases for `test_wp_privacy_anonymize_ip()`. + * Data provider for `test_wp_privacy_anonymize_ip()`. * * @since 4.9.6 Moved from `Test_WP_Community_Events::data_get_unsafe_client_ip_anonymization()`. * @@ -261,28 +261,28 @@ class Tests_Functions_Anonymization extends WP_UnitTestCase { } /** - * Test email anonymization of `wp_privacy_anonymize_data()`. + * Tests email anonymization of `wp_privacy_anonymize_data()`. */ public function test_anonymize_email() { $this->assertSame( 'deleted@site.invalid', wp_privacy_anonymize_data( 'email', 'bar@example.com' ) ); } /** - * Test url anonymization of `wp_privacy_anonymize_data()`. + * Tests URL anonymization of `wp_privacy_anonymize_data()`. */ public function test_anonymize_url() { $this->assertSame( 'https://site.invalid', wp_privacy_anonymize_data( 'url', 'https://example.com/author/username' ) ); } /** - * Test date anonymization of `wp_privacy_anonymize_data()`. + * Tests date anonymization of `wp_privacy_anonymize_data()`. */ public function test_anonymize_date() { $this->assertSame( '0000-00-00 00:00:00', wp_privacy_anonymize_data( 'date', '2003-12-25 12:34:56' ) ); } /** - * Test text anonymization of `wp_privacy_anonymize_data()`. + * Tests text anonymization of `wp_privacy_anonymize_data()`. */ public function test_anonymize_text() { $text = __( 'Four score and seven years ago' ); @@ -290,7 +290,7 @@ class Tests_Functions_Anonymization extends WP_UnitTestCase { } /** - * Test long text anonymization of `wp_privacy_anonymize_data()`. + * Tests long text anonymization of `wp_privacy_anonymize_data()`. */ public function test_anonymize_long_text() { $text = __( 'Four score and seven years ago' ); @@ -298,7 +298,7 @@ class Tests_Functions_Anonymization extends WP_UnitTestCase { } /** - * Test text anonymization when a filter is added. + * Tests text anonymization when a filter is added. * * @ticket 44141 */ @@ -311,7 +311,7 @@ class Tests_Functions_Anonymization extends WP_UnitTestCase { } /** - * Change the anonymized value for URLs. + * Changes the anonymized value for URLs. * * @since 4.9.8 * diff --git a/tests/phpunit/tests/functions/cleanDirsizeCache.php b/tests/phpunit/tests/functions/cleanDirsizeCache.php index 27aacda62b..e8a247de24 100644 --- a/tests/phpunit/tests/functions/cleanDirsizeCache.php +++ b/tests/phpunit/tests/functions/cleanDirsizeCache.php @@ -8,7 +8,7 @@ class Tests_Functions_CleanDirsizeCache extends WP_UnitTestCase { /** - * Test the handling of invalid data passed as the $path parameter. + * Tests the handling of invalid data passed as the $path parameter. * * @ticket 52241 * @@ -53,7 +53,7 @@ class Tests_Functions_CleanDirsizeCache extends WP_UnitTestCase { } /** - * Test the handling of a non-path text string passed as the $path parameter. + * Tests the handling of a non-path text string passed as the $path parameter. * * @ticket 52241 * @@ -105,7 +105,7 @@ class Tests_Functions_CleanDirsizeCache extends WP_UnitTestCase { } /** - * Test the behaviour of the function when the transient doesn't exist. + * Tests the behaviour of the function when the transient doesn't exist. * * @ticket 52241 * @ticket 53635 @@ -121,7 +121,7 @@ class Tests_Functions_CleanDirsizeCache extends WP_UnitTestCase { } /** - * Test the behaviour of the function when the transient does exist, but is not an array. + * Tests the behaviour of the function when the transient does exist, but is not an array. * * In particular, this tests that no PHP TypeErrors are being thrown. * diff --git a/tests/phpunit/tests/functions/cleanupHeaderComment.php b/tests/phpunit/tests/functions/cleanupHeaderComment.php index 4675db041a..06af432fd1 100644 --- a/tests/phpunit/tests/functions/cleanupHeaderComment.php +++ b/tests/phpunit/tests/functions/cleanupHeaderComment.php @@ -11,7 +11,7 @@ class Tests_Functions_CleanupHeaderComment extends WP_UnitTestCase { /** - * Test cleanup header of header comment. + * Tests _cleanup_header_comment(). * * @dataProvider data_cleanup_header_comment * @@ -23,7 +23,7 @@ class Tests_Functions_CleanupHeaderComment extends WP_UnitTestCase { } /** - * Data provider for test_cleanup_header_comment. + * Data provider for test_cleanup_header_comment(). * * @return array[] Test parameters { * @type string $test_string Test string. diff --git a/tests/phpunit/tests/functions/doEnclose.php b/tests/phpunit/tests/functions/doEnclose.php index a72b603061..6c06f35182 100644 --- a/tests/phpunit/tests/functions/doEnclose.php +++ b/tests/phpunit/tests/functions/doEnclose.php @@ -29,7 +29,7 @@ class Tests_Functions_DoEnclose extends WP_UnitTestCase { } /** - * Test the function with an explicit content input. + * Tests the function with an explicit content input. * * @since 5.3.0 * @@ -45,7 +45,7 @@ class Tests_Functions_DoEnclose extends WP_UnitTestCase { } /** - * Test the function with an implicit content input. + * Tests the function with an implicit content input. * * @since 5.3.0 * @@ -65,7 +65,7 @@ class Tests_Functions_DoEnclose extends WP_UnitTestCase { } /** - * Dataprovider for `test_function_with_explicit_content_input()` + * Data provider for `test_function_with_explicit_content_input()` * and `test_function_with_implicit_content_input()`. * * @since 5.3.0 diff --git a/tests/phpunit/tests/functions/wpArrayGet.php b/tests/phpunit/tests/functions/wpArrayGet.php index 8fdf23bcf9..4249aa9b70 100644 --- a/tests/phpunit/tests/functions/wpArrayGet.php +++ b/tests/phpunit/tests/functions/wpArrayGet.php @@ -11,7 +11,7 @@ class Tests_Functions_wpArrayGet extends WP_UnitTestCase { /** - * Test _wp_array_get() with invalid parameters. + * Tests _wp_array_get() with invalid parameters. * * @ticket 51720 */ @@ -57,7 +57,7 @@ class Tests_Functions_wpArrayGet extends WP_UnitTestCase { } /** - * Test _wp_array_get() with non-subtree paths. + * Tests _wp_array_get() with non-subtree paths. * * @ticket 51720 */ @@ -111,7 +111,7 @@ class Tests_Functions_wpArrayGet extends WP_UnitTestCase { } /** - * Test _wp_array_get() with subtrees. + * Tests _wp_array_get() with subtrees. * * @ticket 51720 */ @@ -160,7 +160,7 @@ class Tests_Functions_wpArrayGet extends WP_UnitTestCase { } /** - * Test _wp_array_get() with zero strings. + * Tests _wp_array_get() with zero strings. * * @ticket 51720 */ @@ -211,7 +211,7 @@ class Tests_Functions_wpArrayGet extends WP_UnitTestCase { } /** - * Test _wp_array_get() with null values. + * Tests _wp_array_get() with null values. * * @ticket 51720 */ @@ -253,7 +253,7 @@ class Tests_Functions_wpArrayGet extends WP_UnitTestCase { } /** - * Test _wp_array_get() with empty paths. + * Tests _wp_array_get() with empty paths. * * @ticket 51720 */ diff --git a/tests/phpunit/tests/functions/wpArraySet.php b/tests/phpunit/tests/functions/wpArraySet.php index 8a468fabea..568ef637f1 100644 --- a/tests/phpunit/tests/functions/wpArraySet.php +++ b/tests/phpunit/tests/functions/wpArraySet.php @@ -11,7 +11,7 @@ class Tests_Functions_wpArraySet extends WP_UnitTestCase { /** - * Test _wp_array_set() with invalid parameters. + * Tests _wp_array_set() with invalid parameters. * * @ticket 53175 */ @@ -53,7 +53,7 @@ class Tests_Functions_wpArraySet extends WP_UnitTestCase { } /** - * Test _wp_array_set() with simple non-subtree path. + * Tests _wp_array_set() with simple non-subtree path. * * @ticket 53175 */ @@ -84,7 +84,7 @@ class Tests_Functions_wpArraySet extends WP_UnitTestCase { } /** - * Test _wp_array_set() with subtree paths. + * Tests _wp_array_set() with subtree paths. * * @ticket 53175 */ diff --git a/tests/phpunit/tests/functions/wpArraySliceAssoc.php b/tests/phpunit/tests/functions/wpArraySliceAssoc.php index ddafd7dcc0..f4f2c503e8 100644 --- a/tests/phpunit/tests/functions/wpArraySliceAssoc.php +++ b/tests/phpunit/tests/functions/wpArraySliceAssoc.php @@ -11,7 +11,7 @@ class Tests_Functions_wpArraySliceAssoc extends WP_UnitTestCase { /** - * Test wp_array_slice_assoc(). + * Tests wp_array_slice_assoc(). * * @dataProvider data_wp_array_slice_assoc_arrays * @@ -26,7 +26,7 @@ class Tests_Functions_wpArraySliceAssoc extends WP_UnitTestCase { } /** - * Test data for wp_array_slice_assoc(). + * Data provider for wp_array_slice_assoc(). * * @return array */ diff --git a/tests/phpunit/tests/functions/wpToKebabCase.php b/tests/phpunit/tests/functions/wpToKebabCase.php index df110a61fa..7a765c78f3 100644 --- a/tests/phpunit/tests/functions/wpToKebabCase.php +++ b/tests/phpunit/tests/functions/wpToKebabCase.php @@ -11,7 +11,7 @@ class Tests_Functions_wpToKebabCase extends WP_UnitTestCase { /** - * Test _wp_to_kebab_case(). + * Tests _wp_to_kebab_case(). * * @dataProvider data_wp_to_kebab_case * diff --git a/tests/phpunit/tests/functions/wpValidateBoolean.php b/tests/phpunit/tests/functions/wpValidateBoolean.php index f3ccbb1e7c..32ee1d1916 100644 --- a/tests/phpunit/tests/functions/wpValidateBoolean.php +++ b/tests/phpunit/tests/functions/wpValidateBoolean.php @@ -9,7 +9,7 @@ class Tests_Functions_wpValidateBoolean extends WP_UnitTestCase { /** - * Test wp_validate_boolean(). + * Tests wp_validate_boolean(). * * @dataProvider data_wp_validate_boolean *