From 4b22694e762d4e674adda997889bb09a5982ff0f Mon Sep 17 00:00:00 2001
From: Sergey Biryukov
Date: Fri, 8 Jul 2022 00:11:15 +0000
Subject: [PATCH] Tests: Remove `@uses` tags from the test suite.
* These were not used consistently, with only four instances across all the tests.
* Using this tag in combination with the `beStrictAboutCoversAnnotation="true"` setting will mark a test as "Risky" if code is executed during the test which is not annotated via `@covers` or `@uses` tags. That would make the maintainance of the tags very fiddly, while adding little additional value for the test code base.
Follow-up to [32995], [39914], [42636], [53682].
Props jrf.
See #39265.
git-svn-id: https://develop.svn.wordpress.org/trunk@53687 602fd350-edb4-49c9-b593-d223f7449a82
---
tests/phpunit/tests/formatting/wpAutop.php | 2 --
tests/phpunit/tests/term/wpGenerateTagCloud.php | 2 --
tests/phpunit/tests/url.php | 2 --
tests/phpunit/tests/url/getPrivacyPolicyUrl.php | 2 --
4 files changed, 8 deletions(-)
diff --git a/tests/phpunit/tests/formatting/wpAutop.php b/tests/phpunit/tests/formatting/wpAutop.php
index a330f8a45d..315a0c9794 100644
--- a/tests/phpunit/tests/formatting/wpAutop.php
+++ b/tests/phpunit/tests/formatting/wpAutop.php
@@ -544,8 +544,6 @@ line 2
* wpautop() should not add extra
before
*
* @ticket 39307
- *
- * @uses ::trim
*/
public function test_that_wpautop_does_not_add_extra_closing_p_in_figure() {
$content1 = 'Caption';
diff --git a/tests/phpunit/tests/term/wpGenerateTagCloud.php b/tests/phpunit/tests/term/wpGenerateTagCloud.php
index eff3a3d6bb..d1b02bb04d 100644
--- a/tests/phpunit/tests/term/wpGenerateTagCloud.php
+++ b/tests/phpunit/tests/term/wpGenerateTagCloud.php
@@ -295,8 +295,6 @@ class Tests_WP_Generate_Tag_Cloud extends WP_UnitTestCase {
/**
* Helper method retrieve the created terms.
*
- * @uses get_terms
- *
* @param array $get_terms_args Options passed to get_terms()
*
* @return array
diff --git a/tests/phpunit/tests/url.php b/tests/phpunit/tests/url.php
index a5871ecdc7..1561d3a03c 100644
--- a/tests/phpunit/tests/url.php
+++ b/tests/phpunit/tests/url.php
@@ -212,8 +212,6 @@ class Tests_URL extends WP_UnitTestCase {
/**
* @covers ::home_url
- *
- * @uses ::get_option
*/
public function test_home_url_from_admin() {
// Pretend to be in the site admin.
diff --git a/tests/phpunit/tests/url/getPrivacyPolicyUrl.php b/tests/phpunit/tests/url/getPrivacyPolicyUrl.php
index 6518cd064f..ad0c9c1f00 100644
--- a/tests/phpunit/tests/url/getPrivacyPolicyUrl.php
+++ b/tests/phpunit/tests/url/getPrivacyPolicyUrl.php
@@ -57,8 +57,6 @@ class Tests_Url_GetPrivacyPolicyUrl extends WP_UnitTestCase {
/**
* The function should return the privacy policy URL when `wp_page_for_privacy_policy` is set.
- *
- * @uses ::get_permalink
*/
public function test_get_privacy_policy_url_should_return_valid_url_when_policy_page_set() {
$privacy_policy_url = get_permalink( self::$privacy_policy_page_id );