From ead65857549f41a6a0fc8c7b3e8edf7a64ebbbba Mon Sep 17 00:00:00 2001 From: Aaron Jorbin Date: Tue, 17 May 2016 20:19:50 +0000 Subject: [PATCH] Correct usage of Covers for Tests_Update_Comment_Count_Now When @covers is used with a plain alphanumeric string, PHPUnit assumes that it is covering a class. If there is no class, it fails and exits rather than continuing to generate coverage. To cover a global function, the name must start with ::. See https://phpunit.de/manual/5.3/en/appendixes.annotations.html#appendixes.annotations.covers [37445] for trunk See #35060, #36867 git-svn-id: https://develop.svn.wordpress.org/trunk@37447 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/comment/wpUpdateCommentCountNow.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/phpunit/tests/comment/wpUpdateCommentCountNow.php b/tests/phpunit/tests/comment/wpUpdateCommentCountNow.php index 7e3ed2bcae..2d055ca9ca 100644 --- a/tests/phpunit/tests/comment/wpUpdateCommentCountNow.php +++ b/tests/phpunit/tests/comment/wpUpdateCommentCountNow.php @@ -2,7 +2,7 @@ /** * @group comment - * @covers wp_update_comment_count_now + * @covers ::wp_update_comment_count_now */ class Tests_Update_Comment_Count_Now extends WP_UnitTestCase { public function _return_100() {