Make WordPress Core


Ignore:
Timestamp:
05/18/2016 05:13:11 PM (9 years ago)
Author:
jorbin
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/post/types.php

    r36768 r37459  
    6262    /**
    6363     * @ticket 35985
    64      * @covers register_post_type()
     64     * @covers ::register_post_type()
    6565     */
    6666    function test_register_post_type_exclude_from_search_should_default_to_opposite_value_of_public() {
     
    7676    /**
    7777     * @ticket 35985
    78      * @covers register_post_type()
     78     * @covers ::register_post_type()
    7979     */
    8080    function test_register_post_type_publicly_queryable_should_default_to_value_of_public() {
     
    9090    /**
    9191     * @ticket 35985
    92      * @covers register_post_type()
     92     * @covers ::register_post_type()
    9393     */
    9494    function test_register_post_type_show_ui_should_default_to_value_of_public() {
     
    104104    /**
    105105     * @ticket 35985
    106      * @covers register_post_type()
     106     * @covers ::register_post_type()
    107107     */
    108108    function test_register_post_type_show_in_menu_should_default_to_value_of_show_ui() {
     
    123123    /**
    124124     * @ticket 35985
    125      * @covers register_post_type()
     125     * @covers ::register_post_type()
    126126     */
    127127    function test_register_post_type_show_in_nav_menus_should_default_to_value_of_public() {
     
    137137    /**
    138138     * @ticket 35985
    139      * @covers register_post_type()
     139     * @covers ::register_post_type()
    140140     */
    141141    function test_register_post_type_show_in_admin_bar_should_default_to_value_of_show_in_menu() {
Note: See TracChangeset for help on using the changeset viewer.