mirror of
git://develop.git.wordpress.org/
synced 2025-03-23 21:39:50 +01:00
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
This commit is contained in:
parent
f764d7381a
commit
7a96aefac6
@ -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
|
||||
*
|
||||
|
@ -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.
|
||||
*
|
||||
|
@ -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.
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
*/
|
||||
|
@ -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
|
||||
*/
|
||||
|
@ -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
|
||||
*/
|
||||
|
@ -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
|
||||
*
|
||||
|
@ -9,7 +9,7 @@
|
||||
class Tests_Functions_wpValidateBoolean extends WP_UnitTestCase {
|
||||
|
||||
/**
|
||||
* Test wp_validate_boolean().
|
||||
* Tests wp_validate_boolean().
|
||||
*
|
||||
* @dataProvider data_wp_validate_boolean
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user