From 1bd3cac151358ceb1b5efffebe50e16274d16a59 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Fri, 11 Aug 2023 11:17:40 +0000 Subject: [PATCH] Tests: Correct two `@covers` annotations to use the recommended pattern. When global functions are covered, they need to be prefixed with `::` (double colon) to distinguish them from class name. Reference: [https://docs.phpunit.de/en/10.3/annotations.html#covers PHPUnit Manual: @covers annotation]. Follow-up to [48848], [49305], [53741], [56296]. Props ayeshrajans. Fixes #59069. git-svn-id: https://develop.svn.wordpress.org/trunk@56384 602fd350-edb4-49c9-b593-d223f7449a82 --- .../tests/rest-api/rest-navigation-fallback-controller.php | 2 +- tests/phpunit/tests/theme/customHeader.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/phpunit/tests/rest-api/rest-navigation-fallback-controller.php b/tests/phpunit/tests/rest-api/rest-navigation-fallback-controller.php index 369c97dd62..b2374f3ff6 100644 --- a/tests/phpunit/tests/rest-api/rest-navigation-fallback-controller.php +++ b/tests/phpunit/tests/rest-api/rest-navigation-fallback-controller.php @@ -153,7 +153,7 @@ class WP_REST_Navigation_Fallback_Controller_Test extends WP_Test_REST_Controlle * * @ticket 58557 * - * @covers wp_add_fields_to_navigation_fallback_embedded_links + * @covers ::wp_add_fields_to_navigation_fallback_embedded_links * * @since 6.3.0 Added Navigation Fallbacks endpoint. */ diff --git a/tests/phpunit/tests/theme/customHeader.php b/tests/phpunit/tests/theme/customHeader.php index 13455df663..f78f6fc2af 100644 --- a/tests/phpunit/tests/theme/customHeader.php +++ b/tests/phpunit/tests/theme/customHeader.php @@ -88,7 +88,7 @@ class Tests_Theme_CustomHeader extends WP_UnitTestCase { * * @ticket 56180 * - * @covers get_header_image + * @covers ::get_header_image * * @dataProvider data_filter_header_image *