Make WordPress Core

Changeset 49305


Ignore:
Timestamp:
10/25/2020 12:31:12 AM (4 years ago)
Author:
SergeyBiryukov
Message:

Tests: Correct newly introduced @covers tags.

When global functions are covered, they need to be prefixed with :: (double colon) to distinguish them from class name.

See https://phpunit.readthedocs.io/en/7.0/annotations.html#covers for more details.

Follow-up to [49000], [49171].

Props jrf.
See #39265.

Location:
trunk/tests/phpunit/tests
Files:
3 edited

Legend:

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

    r49000 r49305  
    4545     * Ensure wp_publish_post adds default category.
    4646     *
    47      * @covers wp_publish_post
     47     * @covers ::wp_publish_post
    4848     * @ticket 51292
    4949     */
     
    6565     * Ensure wp_publish_post adds default category when tagged.
    6666     *
    67      * @covers wp_publish_post
     67     * @covers ::wp_publish_post
    6868     * @ticket 51292
    6969     */
     
    8686     * Ensure wp_publish_post does not add default term in error.
    8787     *
    88      * @covers wp_publish_post
     88     * @covers ::wp_publish_post
    8989     * @ticket 51292
    9090     */
     
    121121     * Ensure wp_publish_post adds default term.
    122122     *
    123      * @covers wp_publish_post
     123     * @covers ::wp_publish_post
    124124     * @ticket 51292
    125125     */
  • trunk/tests/phpunit/tests/taxonomy.php

    r49171 r49305  
    10501050     * Ensure custom callbacks are used when registered.
    10511051     *
    1052      * @covers register_taxonomy
     1052     * @covers ::register_taxonomy
    10531053     * @ticket 40351
    10541054     */
  • trunk/tests/phpunit/tests/term/termCounts.php

    r49141 r49305  
    8282     * Term counts are not double incremented when post created.
    8383     *
    84      * @covers wp_modify_term_count_by
     84     * @covers ::wp_modify_term_count_by
    8585     * @dataProvider data_term_count_changes_for_post_statuses
    8686     * @ticket 40351
     
    122122     * Term counts increments correctly when post status becomes published.
    123123     *
    124      * @covers wp_publish_post
    125      * @covers wp_modify_term_count_by
     124     * @covers ::wp_publish_post
     125     * @covers ::wp_modify_term_count_by
    126126     * @dataProvider data_term_counts_incremented_on_publish
    127127     * @ticket 40351
     
    165165     * Test post status transition update term counts correctly.
    166166     *
    167      * @covers wp_modify_term_count_by
     167     * @covers ::wp_modify_term_count_by
    168168     * @dataProvider data_term_count_transitions_update_term_counts
    169169     * @ticket 40351
     
    231231     * Term counts are not double incremented when post created.
    232232     *
    233      * @covers wp_modify_term_count_by
     233     * @covers ::wp_modify_term_count_by
    234234     * @dataProvider data_term_count_changes_for_post_statuses_with_attachments
    235235     * @ticket 40351
     
    280280     * Term counts increments correctly when post status becomes published.
    281281     *
    282      * @covers wp_publish_post
    283      * @covers wp_modify_term_count_by
     282     * @covers ::wp_publish_post
     283     * @covers ::wp_modify_term_count_by
    284284     * @dataProvider data_term_counts_incremented_on_publish_with_attachments
    285285     * @ticket 40351
     
    332332     * Test post status transition update term counts correctly.
    333333     *
    334      * @covers wp_modify_term_count_by
     334     * @covers ::wp_modify_term_count_by
    335335     * @dataProvider data_term_count_transitions_update_term_counts_with_attachments
    336336     * @ticket 40351
     
    407407     * Term counts are not double incremented when post created.
    408408     *
    409      * @covers wp_modify_term_count_by
     409     * @covers ::wp_modify_term_count_by
    410410     * @dataProvider data_term_count_changes_for_post_statuses_with_untermed_attachments
    411411     * @ticket 40351
     
    455455     * Term counts increments correctly when post status becomes published.
    456456     *
    457      * @covers wp_modify_term_count_by
    458      * @covers wp_publish_post
     457     * @covers ::wp_modify_term_count_by
     458     * @covers ::wp_publish_post
    459459     * @dataProvider data_term_counts_incremented_on_publish_with_untermed_attachments
    460460     * @ticket 40351
     
    506506     * Test post status transition update term counts correctly.
    507507     *
    508      * @covers wp_modify_term_count_by
     508     * @covers ::wp_modify_term_count_by
    509509     * @dataProvider data_term_count_transitions_update_term_counts_with_untermed_attachments
    510510     * @ticket 40351
     
    580580     * User taxonomy term counts increments when added to an account.
    581581     *
    582      * @covers wp_modify_term_count_by
     582     * @covers ::wp_modify_term_count_by
    583583     * @ticket 51292
    584584     */
     
    594594     * User taxonomy term counts decrement when term deleted from user.
    595595     *
    596      * @covers wp_modify_term_count_by
     596     * @covers ::wp_modify_term_count_by
    597597     * @ticket 51292
    598598     */
     
    609609     * Ensure DB queries for deferred counts are nullified for net zero gain.
    610610     *
    611      * @covers wp_modify_term_count_by
    612      * @covers wp_defer_term_counting
     611     * @covers ::wp_modify_term_count_by
     612     * @covers ::wp_defer_term_counting
    613613     * @ticket 51292
    614614     */
     
    633633     * Ensure full recounts follow modify by X recounts to avoid miscounts.
    634634     *
    635      * @covers wp_modify_term_count_by
    636      * @covers wp_update_term_count
    637      * @covers wp_defer_term_counting
     635     * @covers ::wp_modify_term_count_by
     636     * @covers ::wp_update_term_count
     637     * @covers ::wp_defer_term_counting
    638638     * @ticket 51292
    639639     */
     
    657657     * Ensure DB queries for deferred counts are combined.
    658658     *
    659      * @covers wp_modify_term_count_by
    660      * @covers wp_defer_term_counting
     659     * @covers ::wp_modify_term_count_by
     660     * @covers ::wp_defer_term_counting
    661661     * @ticket 51292
    662662     */
Note: See TracChangeset for help on using the changeset viewer.