mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
Tests: Add @coversNothing tag for PHP polyfill tests in phpunit/tests/compat/.
The `@covers` tags for these tests were previously removed to avoid notices when generating the code coverage report on PHP versions where these functions are natively available and not user-defined:
{{{
"@covers ::array_key_first" is invalid
"@covers ::array_key_last" is invalid
"@covers ::hash_hmac" is invalid
"@covers ::is_countable" is invalid
"@covers ::is_iterable" is invalid
"@covers ::mb_strlen" is invalid
"@covers ::mb_substr" is invalid
"@covers ::str_contains" is invalid
"@covers ::str_ends_with" is invalid
"@covers ::str_starts_with" is invalid
}}}
Explicitly including a `@coversNothing` annotation in this case appears to be a more appropriate option than not including any annotation at all.
Follow-up to [51852], [52038], [52039], [52040], [54049].
See #39265, #55652.
git-svn-id: https://develop.svn.wordpress.org/trunk@54060 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
|
||||
/**
|
||||
* @group compat
|
||||
*
|
||||
* @coversNothing
|
||||
*/
|
||||
class Tests_Compat_arrayKeyFirst extends WP_UnitTestCase {
|
||||
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
/**
|
||||
* @group compat
|
||||
*
|
||||
* @coversNothing
|
||||
*/
|
||||
class Tests_Compat_ArrayKeyLast extends WP_UnitTestCase {
|
||||
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
/**
|
||||
* @group compat
|
||||
*
|
||||
* @coversNothing
|
||||
*/
|
||||
class Tests_Compat_isCountable extends WP_UnitTestCase {
|
||||
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
/**
|
||||
* @group compat
|
||||
*
|
||||
* @coversNothing
|
||||
*/
|
||||
class Tests_Compat_isIterable extends WP_UnitTestCase {
|
||||
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
/**
|
||||
* @group compat
|
||||
*
|
||||
* @coversNothing
|
||||
*/
|
||||
class Tests_Compat_strContains extends WP_UnitTestCase {
|
||||
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
/**
|
||||
* @group compat
|
||||
*
|
||||
* @coversNothing
|
||||
*/
|
||||
class Tests_Compat_StrEndsWith extends WP_UnitTestCase {
|
||||
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
/**
|
||||
* @group compat
|
||||
*
|
||||
* @coversNothing
|
||||
*/
|
||||
class Tests_Compat_StrStartsWith extends WP_UnitTestCase {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user