Correct usage of @Covers for Tests_Post_Types

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

Introduced in [36768].

Fixes #36867. See #35985



git-svn-id: https://develop.svn.wordpress.org/trunk@37459 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Aaron Jorbin 2016-05-18 17:13:11 +00:00
parent c3f1088548
commit 63cdf85fad
1 changed files with 6 additions and 6 deletions

View File

@ -61,7 +61,7 @@ class Tests_Post_Types extends WP_UnitTestCase {
/** /**
* @ticket 35985 * @ticket 35985
* @covers register_post_type() * @covers ::register_post_type()
*/ */
function test_register_post_type_exclude_from_search_should_default_to_opposite_value_of_public() { function test_register_post_type_exclude_from_search_should_default_to_opposite_value_of_public() {
/* /*
@ -75,7 +75,7 @@ class Tests_Post_Types extends WP_UnitTestCase {
/** /**
* @ticket 35985 * @ticket 35985
* @covers register_post_type() * @covers ::register_post_type()
*/ */
function test_register_post_type_publicly_queryable_should_default_to_value_of_public() { function test_register_post_type_publicly_queryable_should_default_to_value_of_public() {
/* /*
@ -89,7 +89,7 @@ class Tests_Post_Types extends WP_UnitTestCase {
/** /**
* @ticket 35985 * @ticket 35985
* @covers register_post_type() * @covers ::register_post_type()
*/ */
function test_register_post_type_show_ui_should_default_to_value_of_public() { function test_register_post_type_show_ui_should_default_to_value_of_public() {
/* /*
@ -103,7 +103,7 @@ class Tests_Post_Types extends WP_UnitTestCase {
/** /**
* @ticket 35985 * @ticket 35985
* @covers register_post_type() * @covers ::register_post_type()
*/ */
function test_register_post_type_show_in_menu_should_default_to_value_of_show_ui() { function test_register_post_type_show_in_menu_should_default_to_value_of_show_ui() {
/* /*
@ -122,7 +122,7 @@ class Tests_Post_Types extends WP_UnitTestCase {
/** /**
* @ticket 35985 * @ticket 35985
* @covers register_post_type() * @covers ::register_post_type()
*/ */
function test_register_post_type_show_in_nav_menus_should_default_to_value_of_public() { function test_register_post_type_show_in_nav_menus_should_default_to_value_of_public() {
/* /*
@ -136,7 +136,7 @@ class Tests_Post_Types extends WP_UnitTestCase {
/** /**
* @ticket 35985 * @ticket 35985
* @covers register_post_type() * @covers ::register_post_type()
*/ */
function test_register_post_type_show_in_admin_bar_should_default_to_value_of_show_in_menu() { function test_register_post_type_show_in_admin_bar_should_default_to_value_of_show_in_menu() {
/* /*