From b42fd2b70ce5cdfe2ddd8bae37a4cabbd6042b3a Mon Sep 17 00:00:00 2001
From: jrfnl <jrfnl@users.noreply.github.com>
Date: Sat, 24 Oct 2020 08:48:46 +0200
Subject: [PATCH] More @covers tags fixes
---
tests/phpunit/tests/post/wpPublishPosts.php | 8 ++--
tests/phpunit/tests/taxonomy.php | 2 +-
tests/phpunit/tests/term/termCounts.php | 42 ++++++++++-----------
3 files changed, 26 insertions(+), 26 deletions(-)
diff --git a/tests/phpunit/tests/post/wpPublishPosts.php b/tests/phpunit/tests/post/wpPublishPosts.php
index 42e3884d94..00faaa1656 100644
|
a
|
b
|
class Tests_WPPublishPost extends WP_UnitTestCase { |
| 44 | 44 | /** |
| 45 | 45 | * Ensure wp_publish_post adds default category. |
| 46 | 46 | * |
| 47 | | * @covers wp_publish_post |
| | 47 | * @covers ::wp_publish_post |
| 48 | 48 | * @ticket 51292 |
| 49 | 49 | */ |
| 50 | 50 | function test_wp_publish_post_adds_default_category() { |
| … |
… |
class Tests_WPPublishPost extends WP_UnitTestCase { |
| 64 | 64 | /** |
| 65 | 65 | * Ensure wp_publish_post adds default category when tagged. |
| 66 | 66 | * |
| 67 | | * @covers wp_publish_post |
| | 67 | * @covers ::wp_publish_post |
| 68 | 68 | * @ticket 51292 |
| 69 | 69 | */ |
| 70 | 70 | function test_wp_publish_post_adds_default_category_when_tagged() { |
| … |
… |
class Tests_WPPublishPost extends WP_UnitTestCase { |
| 85 | 85 | /** |
| 86 | 86 | * Ensure wp_publish_post does not add default term in error. |
| 87 | 87 | * |
| 88 | | * @covers wp_publish_post |
| | 88 | * @covers ::wp_publish_post |
| 89 | 89 | * @ticket 51292 |
| 90 | 90 | */ |
| 91 | 91 | function test_wp_publish_post_respects_current_terms() { |
| … |
… |
class Tests_WPPublishPost extends WP_UnitTestCase { |
| 120 | 120 | /** |
| 121 | 121 | * Ensure wp_publish_post adds default term. |
| 122 | 122 | * |
| 123 | | * @covers wp_publish_post |
| | 123 | * @covers ::wp_publish_post |
| 124 | 124 | * @ticket 51292 |
| 125 | 125 | */ |
| 126 | 126 | function test_wp_publish_post_adds_default_term() { |
diff --git a/tests/phpunit/tests/taxonomy.php b/tests/phpunit/tests/taxonomy.php
index b697b17096..5d39d000f1 100644
|
a
|
b
|
class Tests_Taxonomy extends WP_UnitTestCase { |
| 1049 | 1049 | /** |
| 1050 | 1050 | * Ensure custom callbacks are used when registered. |
| 1051 | 1051 | * |
| 1052 | | * @covers register_taxonomy |
| | 1052 | * @covers ::register_taxonomy |
| 1053 | 1053 | * @ticket 40351 |
| 1054 | 1054 | */ |
| 1055 | 1055 | function test_register_taxonomy_counting_callbacks() { |
diff --git a/tests/phpunit/tests/term/termCounts.php b/tests/phpunit/tests/term/termCounts.php
index 6e197c5d07..be3d0f18f4 100644
|
a
|
b
|
class Tests_Term_termCount extends WP_UnitTestCase { |
| 81 | 81 | /** |
| 82 | 82 | * Term counts are not double incremented when post created. |
| 83 | 83 | * |
| 84 | | * @covers wp_modify_term_count_by |
| | 84 | * @covers ::wp_modify_term_count_by |
| 85 | 85 | * @dataProvider data_term_count_changes_for_post_statuses |
| 86 | 86 | * @ticket 40351 |
| 87 | 87 | * |
| … |
… |
class Tests_Term_termCount extends WP_UnitTestCase { |
| 121 | 121 | /** |
| 122 | 122 | * Term counts increments correctly when post status becomes published. |
| 123 | 123 | * |
| 124 | | * @covers wp_publish_post |
| 125 | | * @covers wp_modify_term_count_by |
| | 124 | * @covers ::wp_publish_post |
| | 125 | * @covers ::wp_modify_term_count_by |
| 126 | 126 | * @dataProvider data_term_counts_incremented_on_publish |
| 127 | 127 | * @ticket 40351 |
| 128 | 128 | * @ticket 51292 |
| … |
… |
class Tests_Term_termCount extends WP_UnitTestCase { |
| 164 | 164 | /** |
| 165 | 165 | * Test post status transition update term counts correctly. |
| 166 | 166 | * |
| 167 | | * @covers wp_modify_term_count_by |
| | 167 | * @covers ::wp_modify_term_count_by |
| 168 | 168 | * @dataProvider data_term_count_transitions_update_term_counts |
| 169 | 169 | * @ticket 40351 |
| 170 | 170 | * |
| … |
… |
class Tests_Term_termCount extends WP_UnitTestCase { |
| 230 | 230 | /** |
| 231 | 231 | * Term counts are not double incremented when post created. |
| 232 | 232 | * |
| 233 | | * @covers wp_modify_term_count_by |
| | 233 | * @covers ::wp_modify_term_count_by |
| 234 | 234 | * @dataProvider data_term_count_changes_for_post_statuses_with_attachments |
| 235 | 235 | * @ticket 40351 |
| 236 | 236 | * |
| … |
… |
class Tests_Term_termCount extends WP_UnitTestCase { |
| 279 | 279 | /** |
| 280 | 280 | * Term counts increments correctly when post status becomes published. |
| 281 | 281 | * |
| 282 | | * @covers wp_publish_post |
| 283 | | * @covers wp_modify_term_count_by |
| | 282 | * @covers ::wp_publish_post |
| | 283 | * @covers ::wp_modify_term_count_by |
| 284 | 284 | * @dataProvider data_term_counts_incremented_on_publish_with_attachments |
| 285 | 285 | * @ticket 40351 |
| 286 | 286 | * @ticket 51292 |
| … |
… |
class Tests_Term_termCount extends WP_UnitTestCase { |
| 331 | 331 | /** |
| 332 | 332 | * Test post status transition update term counts correctly. |
| 333 | 333 | * |
| 334 | | * @covers wp_modify_term_count_by |
| | 334 | * @covers ::wp_modify_term_count_by |
| 335 | 335 | * @dataProvider data_term_count_transitions_update_term_counts_with_attachments |
| 336 | 336 | * @ticket 40351 |
| 337 | 337 | * |
| … |
… |
class Tests_Term_termCount extends WP_UnitTestCase { |
| 406 | 406 | /** |
| 407 | 407 | * Term counts are not double incremented when post created. |
| 408 | 408 | * |
| 409 | | * @covers wp_modify_term_count_by |
| | 409 | * @covers ::wp_modify_term_count_by |
| 410 | 410 | * @dataProvider data_term_count_changes_for_post_statuses_with_untermed_attachments |
| 411 | 411 | * @ticket 40351 |
| 412 | 412 | * |
| … |
… |
class Tests_Term_termCount extends WP_UnitTestCase { |
| 454 | 454 | /** |
| 455 | 455 | * Term counts increments correctly when post status becomes published. |
| 456 | 456 | * |
| 457 | | * @covers wp_modify_term_count_by |
| 458 | | * @covers wp_publish_post |
| | 457 | * @covers ::wp_modify_term_count_by |
| | 458 | * @covers ::wp_publish_post |
| 459 | 459 | * @dataProvider data_term_counts_incremented_on_publish_with_untermed_attachments |
| 460 | 460 | * @ticket 40351 |
| 461 | 461 | * @ticket 51292 |
| … |
… |
class Tests_Term_termCount extends WP_UnitTestCase { |
| 505 | 505 | /** |
| 506 | 506 | * Test post status transition update term counts correctly. |
| 507 | 507 | * |
| 508 | | * @covers wp_modify_term_count_by |
| | 508 | * @covers ::wp_modify_term_count_by |
| 509 | 509 | * @dataProvider data_term_count_transitions_update_term_counts_with_untermed_attachments |
| 510 | 510 | * @ticket 40351 |
| 511 | 511 | * |
| … |
… |
class Tests_Term_termCount extends WP_UnitTestCase { |
| 579 | 579 | /** |
| 580 | 580 | * User taxonomy term counts increments when added to an account. |
| 581 | 581 | * |
| 582 | | * @covers wp_modify_term_count_by |
| | 582 | * @covers ::wp_modify_term_count_by |
| 583 | 583 | * @ticket 51292 |
| 584 | 584 | */ |
| 585 | 585 | public function test_term_counts_user_adding_term() { |
| … |
… |
class Tests_Term_termCount extends WP_UnitTestCase { |
| 593 | 593 | /** |
| 594 | 594 | * User taxonomy term counts decrement when term deleted from user. |
| 595 | 595 | * |
| 596 | | * @covers wp_modify_term_count_by |
| | 596 | * @covers ::wp_modify_term_count_by |
| 597 | 597 | * @ticket 51292 |
| 598 | 598 | */ |
| 599 | 599 | public function test_term_counts_user_removing_term() { |
| … |
… |
class Tests_Term_termCount extends WP_UnitTestCase { |
| 608 | 608 | /** |
| 609 | 609 | * Ensure DB queries for deferred counts are nullified for net zero gain. |
| 610 | 610 | * |
| 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 |
| 613 | 613 | * @ticket 51292 |
| 614 | 614 | */ |
| 615 | 615 | public function test_counts_after_deferral_net_zero() { |
| … |
… |
class Tests_Term_termCount extends WP_UnitTestCase { |
| 632 | 632 | /** |
| 633 | 633 | * Ensure full recounts follow modify by X recounts to avoid miscounts. |
| 634 | 634 | * |
| 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 |
| 638 | 638 | * @ticket 51292 |
| 639 | 639 | */ |
| 640 | 640 | public function test_counts_after_deferral_full_before_partial() { |
| … |
… |
class Tests_Term_termCount extends WP_UnitTestCase { |
| 656 | 656 | /** |
| 657 | 657 | * Ensure DB queries for deferred counts are combined. |
| 658 | 658 | * |
| 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 |
| 661 | 661 | * @ticket 51292 |
| 662 | 662 | */ |
| 663 | 663 | public function test_counts_after_deferral_matching_changes() { |