Make WordPress Core

Changeset 53863


Ignore:
Timestamp:
08/08/2022 11:12:30 PM (4 years ago)
Author:
azaozz
Message:

Build/Test Tools: Add @covers tags to the comments tests.

Props pbearne, jrf, hellofromTonya, patopaiar, ironprogrammer, antonvlasenko, SergeyBiryukov, costdev.
See #39265.

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

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/comment-submission.php

    r53732 r53863  
    4040        }
    4141
     42        /**
     43         * @covers ::wp_handle_comment_submission
     44         */
    4245        public function test_submitting_comment_to_invalid_post_returns_error() {
    4346                $error = 'comment_id_not_found';
    … …  
    5659        }
    5760
     61        /**
     62         * @covers ::wp_handle_comment_submission
     63         */
    5864        public function test_submitting_comment_to_post_with_closed_comments_returns_error() {
    5965
    … …  
    7985        }
    8086
     87        /**
     88         * @covers ::wp_handle_comment_submission
     89         */
    8190        public function test_submitting_comment_to_trashed_post_returns_error() {
    8291
    … …  
    100109        }
    101110
     111        /**
     112         * @covers ::wp_handle_comment_submission
     113         */
    102114        public function test_submitting_comment_to_draft_post_returns_error() {
    103115                $error = 'comment_on_draft';
    … …  
    125137        /**
    126138         * @ticket 39650
     139         *
     140         * @covers ::wp_handle_comment_submission
    127141         */
    128142        public function test_submitting_comment_to_draft_post_returns_error_message_for_user_with_correct_caps() {
    … …  
    151165        }
    152166
     167        /**
     168         * @covers ::wp_handle_comment_submission
     169         */
    153170        public function test_submitting_comment_to_scheduled_post_returns_error() {
    154171
    … …  
    177194        }
    178195
     196        /**
     197         * @covers ::wp_handle_comment_submission
     198         */
    179199        public function test_submitting_comment_to_password_required_post_returns_error() {
    180200
    … …  
    200220        }
    201221
     222        /**
     223         * @covers ::wp_handle_comment_submission
     224         */
    202225        public function test_submitting_comment_to_password_protected_post_succeeds() {
    203226                if ( PHP_VERSION_ID >= 80100 ) {
    … …  
    237260        }
    238261
     262        /**
     263         * @covers ::wp_handle_comment_submission
     264         */
    239265        public function test_submitting_valid_comment_as_logged_in_user_succeeds() {
    240266
    … …  
    264290        }
    265291
     292        /**
     293         * @covers ::wp_handle_comment_submission
     294         */
    266295        public function test_submitting_valid_comment_anonymously_succeeds() {
    267296
    … …  
    290319         *
    291320         * @group slashes
     321         *
     322         * @covers ::wp_handle_comment_submission
    292323         */
    293324        public function test_submitting_comment_handles_slashes_correctly_handles_slashes() {
    … …  
    319350        }
    320351
     352        /**
     353         * @covers ::wp_handle_comment_submission
     354         */
    321355        public function test_submitting_comment_anonymously_to_private_post_returns_error() {
    322356
    … …  
    340374        }
    341375
     376        /**
     377         * @covers ::wp_handle_comment_submission
     378         */
    342379        public function test_submitting_comment_as_logged_in_user_to_inaccessible_private_post_returns_error() {
    343380
    … …  
    370407        }
    371408
     409        /**
     410         * @covers ::wp_handle_comment_submission
     411         */
    372412        public function test_submitting_comment_to_private_post_with_closed_comments_returns_correct_error() {
    373413
    … …  
    401441        }
    402442
     443        /**
     444         * @covers ::wp_handle_comment_submission
     445         */
    403446        public function test_submitting_comment_to_own_private_post_succeeds() {
    404447
    … …  
    424467        }
    425468
     469        /**
     470         * @covers ::wp_handle_comment_submission
     471         */
    426472        public function test_submitting_comment_to_accessible_private_post_succeeds() {
    427473
    … …  
    447493        }
    448494
     495        /**
     496         * @covers ::wp_handle_comment_submission
     497         */
    449498        public function test_anonymous_user_cannot_comment_unfiltered_html() {
    450499                if ( PHP_VERSION_ID >= 80100 ) {
    … …  
    472521        }
    473522
     523        /**
     524         * @covers ::wp_handle_comment_submission
     525         */
    474526        public function test_unprivileged_user_cannot_comment_unfiltered_html() {
    475527
    … …  
    490542        }
    491543
     544        /**
     545         * @covers ::wp_handle_comment_submission
     546         */
    492547        public function test_unprivileged_user_cannot_comment_unfiltered_html_even_with_valid_nonce() {
    493548
    … …  
    514569        }
    515570
     571        /**
     572         * @covers ::wp_handle_comment_submission
     573         */
    516574        public function test_privileged_user_can_comment_unfiltered_html_with_valid_nonce() {
    517575
    … …  
    546604        }
    547605
     606        /**
     607         * @covers ::wp_handle_comment_submission
     608         */
    548609        public function test_privileged_user_cannot_comment_unfiltered_html_without_valid_nonce() {
    549610
    … …  
    570631        }
    571632
     633        /**
     634         * @covers ::wp_handle_comment_submission
     635         */
    572636        public function test_submitting_comment_as_anonymous_user_when_registration_required_returns_error() {
    573637
    … …  
    589653        }
    590654
     655        /**
     656         * @covers ::wp_handle_comment_submission
     657         */
    591658        public function test_submitting_comment_with_no_name_when_name_email_required_returns_error() {
    592659
    … …  
    610677        }
    611678
     679        /**
     680         * @covers ::wp_handle_comment_submission
     681         */
    612682        public function test_submitting_comment_with_no_email_when_name_email_required_returns_error() {
    613683
    … …  
    631701        }
    632702
     703        /**
     704         * @covers ::wp_handle_comment_submission
     705         */
    633706        public function test_submitting_comment_with_invalid_email_when_name_email_required_returns_error() {
    634707
    … …  
    653726        }
    654727
     728        /**
     729         * @covers ::wp_handle_comment_submission
     730         */
    655731        public function test_submitting_comment_with_no_comment_content_returns_error() {
    656732
    … …  
    672748        /**
    673749         * @ticket 10377
     750         *
     751         * @covers ::wp_handle_comment_submission
    674752         */
    675753        public function test_submitting_comment_with_content_too_long_returns_error() {
    … …  
    690768        /**
    691769         * @ticket 10377
     770         *
     771         * @covers ::wp_handle_comment_submission
    692772         */
    693773        public function test_submitting_comment_with_author_too_long_returns_error() {
    … …  
    708788        /**
    709789         * @ticket 10377
     790         *
     791         * @covers ::wp_handle_comment_submission
    710792         */
    711793        public function test_submitting_comment_with_email_too_long_returns_error() {
    … …  
    726808        /**
    727809         * @ticket 10377
     810         *
     811         * @covers ::wp_handle_comment_submission
    728812         */
    729813        public function test_submitting_comment_with_url_too_long_returns_error() {
    … …  
    745829        /**
    746830         * @ticket 49236
     831         *
     832         * @covers ::wp_handle_comment_submission
    747833         */
    748834        public function test_submitting_comment_with_empty_type_results_in_correct_type() {
    … …  
    774860        /**
    775861         * @ticket 49236
     862         *
     863         * @covers ::wp_insert_comment
    776864         */
    777865        public function test_inserting_comment_with_empty_type_results_in_correct_type() {
    … …  
    794882        /**
    795883         * @ticket 34997
     884         *
     885         * @covers ::wp_handle_comment_submission
    796886         */
    797887        public function test_comment_submission_sends_all_expected_parameters_to_preprocess_comment_filter() {
    … …  
    838928        /**
    839929         * @ticket 36901
     930         *
     931         * @covers ::wp_handle_comment_submission
    840932         */
    841933        public function test_submitting_duplicate_comments() {
    … …  
    864956        /**
    865957         * @ticket 36901
     958         *
     959         * @covers ::wp_handle_comment_submission
    866960         */
    867961        public function test_comments_flood() {
    … …  
    893987        /**
    894988         * @ticket 36901
     989         *
     990         * @covers ::wp_handle_comment_submission
    895991         */
    896992        public function test_comments_flood_user_is_admin() {
  • trunk/tests/phpunit/tests/comment.php

    r52010 r53863  
    3131        }
    3232
     33        /**
     34         * @covers ::wp_update_comment
     35         */
    3336        public function test_wp_update_comment() {
    3437                $post  = self::factory()->post->create_and_get(
    … …  
    7982        /**
    8083         * @ticket 30627
     84         *
     85         * @covers ::wp_update_comment
    8186         */
    8287        public function test_wp_update_comment_updates_comment_type() {
    … …  
    96101        /**
    97102         * @ticket 36784
     103         *
     104         * @covers ::wp_update_comment
    98105         */
    99106        public function test_wp_update_comment_updates_comment_meta() {
    … …  
    115122        /**
    116123         * @ticket 30307
     124         *
     125         * @covers ::wp_update_comment
    117126         */
    118127        public function test_wp_update_comment_updates_user_id() {
    … …  
    132141        /**
    133142         * @ticket 34954
     143         *
     144         * @covers ::wp_update_comment
    134145         */
    135146        public function test_wp_update_comment_with_no_post_id() {
    … …  
    153164        /**
    154165         * @ticket 39732
     166         *
     167         * @covers ::wp_update_comment
    155168         */
    156169        public function test_wp_update_comment_returns_false_for_invalid_comment_or_post_id() {
    … …  
    176189        /**
    177190         * @ticket 39732
     191         *
     192         * @covers ::wp_update_comment
    178193         */
    179194        public function test_wp_update_comment_is_wp_error() {
    … …  
    202217        }
    203218
     219        /**
     220         * @covers ::get_approved_comments
     221         */
    204222        public function test_get_approved_comments() {
    205223                $ca1 = self::factory()->comment->create(
    … …  
    258276        /**
    259277         * @ticket 30412
     278         *
     279         * @covers ::get_approved_comments
    260280         */
    261281        public function test_get_approved_comments_with_post_id_0_should_return_empty_array() {
    … …  
    274294        /**
    275295         * @ticket 14279
     296         *
     297         * @covers ::wp_new_comment
    276298         */
    277299        public function test_wp_new_comment_respects_dates() {
    … …  
    297319        /**
    298320         * @ticket 14601
     321         *
     322         * @covers ::wp_new_comment
    299323         */
    300324        public function test_wp_new_comment_respects_author_ip() {
    … …  
    318342        /**
    319343         * @ticket 14601
     344         *
     345         * @covers ::wp_new_comment
    320346         */
    321347        public function test_wp_new_comment_respects_author_ip_empty_string() {
    … …  
    339365        /**
    340366         * @ticket 14601
     367         *
     368         * @covers ::wp_new_comment
    341369         */
    342370        public function test_wp_new_comment_respects_comment_agent() {
    … …  
    361389        /**
    362390         * @ticket 14601
     391         *
     392         * @covers ::wp_new_comment
    363393         */
    364394        public function test_wp_new_comment_should_trim_provided_comment_agent_to_254_chars() {
    … …  
    383413        /**
    384414         * @ticket 14601
     415         *
     416         * @covers ::wp_new_comment
    385417         */
    386418        public function test_wp_new_comment_respects_comment_agent_empty_string() {
    … …  
    403435        }
    404436
    405 
     437        /**
     438         * @covers ::wp_new_comment
     439         */
    406440        public function test_comment_field_lengths() {
    407441                $data = array(
    … …  
    425459        /**
    426460         * @ticket 32566
     461         *
     462         * @covers ::wp_notify_moderator
    427463         */
    428464        public function test_wp_notify_moderator_should_not_throw_notice_when_post_author_is_0() {
    … …  
    442478        }
    443479
     480        /**
     481         * @covers ::wp_new_comment_notify_postauthor
     482         */
    444483        public function test_wp_new_comment_notify_postauthor_should_send_email_when_comment_is_approved() {
    445484                $c = self::factory()->comment->create(
    … …  
    453492        }
    454493
     494        /**
     495         * @covers ::wp_new_comment_notify_postauthor
     496         */
    455497        public function test_wp_new_comment_notify_postauthor_should_not_send_email_when_comment_is_unapproved() {
    456498                $c = self::factory()->comment->create(
    … …  
    467509        /**
    468510         * @ticket 33587
     511         *
     512         * @covers ::wp_new_comment_notify_postauthor
    469513         */
    470514        public function test_wp_new_comment_notify_postauthor_should_not_send_email_when_comment_has_been_marked_as_spam() {
    … …  
    482526        /**
    483527         * @ticket 35006
     528         *
     529         * @covers ::wp_new_comment_notify_postauthor
    484530         */
    485531        public function test_wp_new_comment_notify_postauthor_should_not_send_email_when_comment_has_been_trashed() {
    … …  
    497543        /**
    498544         * @ticket 43805
     545         *
     546         * @covers ::wp_new_comment_notify_postauthor
    499547         */
    500548        public function test_wp_new_comment_notify_postauthor_content_should_include_link_to_parent() {
    … …  
    521569        /**
    522570         * @ticket 43805
     571         *
     572         * @covers ::wp_new_comment_notify_moderator
    523573         */
    524574        public function test_wp_new_comment_notify_moderator_content_should_include_link_to_parent() {
    … …  
    557607        /**
    558608         * @ticket 12431
     609         *
     610         * @covers ::get_comment_meta
    559611         */
    560612        public function test_wp_new_comment_with_meta() {
    … …  
    574626        /**
    575627         * @ticket 8071
     628         *
     629         * @covers WP_Comment::get_children
    576630         */
    577631        public function test_wp_comment_get_children_should_fill_children() {
    … …  
    634688        /**
    635689         * @ticket 27571
     690         *
     691         * @covers ::get_comment
    636692         */
    637693        public function test_post_properties_should_be_lazyloaded() {
    … …  
    685741        /**
    686742         * @ticket 761
     743         *
     744         * @covers ::wp_new_comment
    687745         */
    688746        public function test_wp_notify_moderator_filter_moderation_notify_option_true_filter_false() {
    … …  
    706764        /**
    707765         * @ticket 761
     766         *
     767         * @covers ::wp_new_comment
    708768         */
    709769        public function test_wp_notify_moderator_filter_moderation_notify_option_false_filter_true() {
    … …  
    727787        /**
    728788         * @ticket 761
     789         *
     790         * @covers ::wp_new_comment
    729791         */
    730792        public function test_wp_notify_post_author_filter_comments_notify_option_true_filter_false() {
    … …  
    749811        /**
    750812         * @ticket 761
     813         *
     814         * @covers ::wp_new_comment
    751815         */
    752816        public function test_wp_notify_post_author_filter_comments_notify_option_false_filter_true() {
    … …  
    853917        }
    854918
     919        /**
     920         * @covers ::_close_comments_for_old_post
     921         */
    855922        public function test_close_comments_for_old_post() {
    856923                update_option( 'close_comments_for_old_posts', true );
    … …  
    868935        }
    869936
     937        /**
     938         * @covers ::_close_comments_for_old_post
     939         */
    870940        public function test_close_comments_for_old_post_undated_draft() {
    871941                $draft_id             = self::factory()->post->create(
    … …  
    882952        /**
    883953         * @ticket 35276
     954         *
     955         * @covers ::wp_update_comment
    884956         */
    885957        public function test_wp_update_comment_author_id_and_agent() {
    … …  
    918990        }
    919991
     992        /**
     993         * @covers ::wp_get_comment_fields_max_lengths
     994         */
    920995        public function test_wp_get_comment_fields_max_lengths() {
    921996                $expected = array(
    … …  
    9381013         * @group privacy
    9391014         * @ticket 43442
     1015         *
     1016         * @covers ::wp_comments_personal_data_eraser
    9401017         */
    9411018        public function test_wp_comments_personal_data_eraser() {
    … …  
    9951072         * @group privacy
    9961073         * @ticket 43442
     1074         *
     1075         * @covers ::wp_comments_personal_data_eraser
    9971076         */
    9981077        public function test_wp_comments_personal_data_eraser_empty_first_page_output() {
    … …  
    10141093         * @group privacy
    10151094         * @ticket 43442
     1095         *
     1096         * @covers ::wp_comments_personal_data_eraser
    10161097         */
    10171098        public function test_wp_comments_personal_data_eraser_non_empty_first_page_output() {
    … …  
    10461127         * @group privacy
    10471128         * @ticket 43442
     1129         *
     1130         * @covers ::wp_comments_personal_data_eraser
    10481131         */
    10491132        public function test_wp_comments_personal_data_eraser_empty_second_page_output() {
    … …  
    10781161         * @group privacy
    10791162         * @ticket 43442
     1163         *
     1164         * @covers ::wp_comments_personal_data_eraser
    10801165         */
    10811166        public function test_wp_anonymize_comment_filter_to_prevent_comment_anonymization() {
    … …  
    11151200         * @group privacy
    11161201         * @ticket 43442
     1202         *
     1203         * @covers ::wp_comments_personal_data_eraser
    11171204         */
    11181205        public function test_wp_anonymize_comment_filter_to_prevent_comment_anonymization_with_custom_message() {
    … …  
    11801267        }
    11811268
     1269        /**
     1270         * @covers ::wp_trash_comment
     1271         */
    11821272        public function test_trash_should_invalidate_comment_cache() {
    11831273                global $wpdb;
    … …  
    11941284        }
    11951285
     1286        /**
     1287         * @covers ::wp_untrash_comment
     1288         */
    11961289        public function test_untrash_should_invalidate_comment_cache() {
    11971290                global $wpdb;
    … …  
    12101303        }
    12111304
     1305        /**
     1306         * @covers ::wp_spam_comment
     1307         */
    12121308        public function test_spam_should_invalidate_comment_cache() {
    12131309                global $wpdb;
    … …  
    12241320        }
    12251321
     1322        /**
     1323         * @covers ::wp_unspam_comment
     1324         */
    12261325        public function test_unspam_should_invalidate_comment_cache() {
    12271326                global $wpdb;
    … …  
    12451344         * @group privacy
    12461345         * @ticket 43440
     1346         *
     1347         * @covers ::wp_comments_personal_data_exporter
    12471348         */
    12481349        public function test_wp_comments_personal_data_exporter() {
    … …  
    12911392         * @group privacy
    12921393         * @ticket 43440
     1394         *
     1395         * @covers ::wp_comments_personal_data_exporter
    12931396         */
    12941397        public function test_wp_comments_personal_data_exporter_no_comments_found() {
    … …  
    13091412         * @group privacy
    13101413         * @ticket 43440
     1414         *
     1415         * @covers ::wp_comments_personal_data_exporter
    13111416         */
    13121417        public function test_wp_comments_personal_data_exporter_empty_comment_prop() {
    … …  
    13401445         * @group privacy
    13411446         * @ticket 43440
     1447         *
     1448         * @covers ::wp_comments_personal_data_exporter
    13421449         */
    13431450        public function test_wp_comments_personal_data_exporter_empty_second_page() {
  • trunk/tests/phpunit/tests/comment/checkComment.php

    r48121 r53863  
    33/**
    44 * @group comment
     5 *
     6 * @covers ::check_comment
    57 */
    68class Tests_Comment_CheckComment extends WP_UnitTestCase {
  • trunk/tests/phpunit/tests/comment/commentForm.php

    r52175 r53863  
    33/**
    44 * @group  comment
     5 *
    56 * @covers ::comment_form
    67 */
  • trunk/tests/phpunit/tests/comment/commentsTemplate.php

    r51657 r53863  
    55 *
    66 * Testing items that are only testable by grabbing the markup of `comments_template()` from the output buffer.
     7 *
     8 * @covers ::comments_template
    79 */
    810class Tests_Comment_CommentsTemplate extends WP_UnitTestCase {
  • trunk/tests/phpunit/tests/comment/dateQuery.php

    r51568 r53863  
    1313 * @group date
    1414 * @group datequery
     15 *
     16 * @covers ::get_comments
    1517 */
    1618class Tests_Comment_DateQuery extends WP_UnitTestCase {
  • trunk/tests/phpunit/tests/comment/getCommentAuthorEmailLink.php

    r51568 r53863  
    22/**
    33 * @group comment
     4 *
     5 * @covers ::get_comment_author_email_link
    46 */
    57class Tests_Comment_GetCommentAuthorEmailLink extends WP_UnitTestCase {
  • trunk/tests/phpunit/tests/comment/getCommentAuthorUrl.php

    r46586 r53863  
    33/**
    44 * @group comment
     5 *
     6 *@covers ::get_comment_author_url
    57 */
    68class Tests_Comment_GetCommentAuthorUrl extends WP_UnitTestCase {
  • trunk/tests/phpunit/tests/comment/getCommentAuthorUrlLink.php

    r49603 r53863  
    33/**
    44 * @group comment
     5 *
     6 * @covers ::get_comment_author_url_link
    57 */
    68class Tests_Comment_GetCommentAuthorUrlLink extends WP_UnitTestCase {
  • trunk/tests/phpunit/tests/comment/getCommentClass.php

    r46586 r53863  
    33/**
    44 * @group comment
     5 *
     6 * @covers ::get_comment_class
    57 */
    68class Tests_Comment_GetCommentClass extends WP_UnitTestCase {
  • trunk/tests/phpunit/tests/comment/getCommentCount.php

    r53036 r53863  
    11<?php
    22
     3/**
     4 * @group comment
     5 *
     6 * Class Tests_Get_Comment_Count
     7 *
     8 * @covers ::get_comment_count
     9 */
    310class Tests_Get_Comment_Count extends WP_UnitTestCase {
    411
  • trunk/tests/phpunit/tests/comment/getCommentExcerpt.php

    r51367 r53863  
    11<?php
    22
     3/**
     4 * @group comment
     5 *
     6 * Class Tests_Get_Comment_Excerpt
     7 *
     8 * @covers ::get_comment_excerpt
     9 */
    310class Tests_Get_Comment_Excerpt extends WP_UnitTestCase {
    411        protected static $bacon_comment = 'Bacon ipsum dolor amet porchetta capicola sirloin prosciutto brisket shankle jerky. Ham hock filet mignon boudin ground round, prosciutto alcatra spare ribs meatball turducken pork beef ribs ham beef. Bacon pastrami short loin, venison tri-tip ham short ribs doner swine. Tenderloin pig tongue pork jowl doner. Pork loin rump t-bone, beef strip steak flank drumstick tri-tip short loin capicola jowl. Cow filet mignon hamburger doner rump. Short loin jowl drumstick, tongue tail beef ribs pancetta flank brisket landjaeger chuck venison frankfurter turkey.
  • trunk/tests/phpunit/tests/comment/getCommentLink.php

    r51462 r53863  
    33/**
    44 * @group comment
     5 *
     6 * @covers ::get_comment_link
    57 */
    68class Tests_Comment_GetCommentLink extends WP_UnitTestCase {
  • trunk/tests/phpunit/tests/comment/getCommentReplyLink.php

    r51462 r53863  
    33/**
    44 * @group comment
     5 *
     6 * @covers ::get_comment_reply_link
    57 */
    68class Tests_Comment_GetCommentReplyLink extends WP_UnitTestCase {
  • trunk/tests/phpunit/tests/comment/getCommentsPagesCount.php

    r52010 r53863  
    44 *
    55 * @group comment
     6 *
     7 * @covers ::get_comment_pages_count
    68 */
    79class Tests_Comment_GetCommentsPagesCount extends WP_UnitTestCase {
  • trunk/tests/phpunit/tests/comment/getPageOfComment.php

    r51571 r53863  
    33/**
    44 * @group comment
     5 *
    56 * @covers ::get_page_of_comment
    67 */
  • trunk/tests/phpunit/tests/comment/isAvatarCommentType.php

    r48848 r53863  
    1212 *
    1313 * @group comment
    14  * @covers ::is_avatar_comment_type
    1514 *
    1615 * @since 5.1.0
     16 *
     17 * @covers ::is_avatar_comment_type
    1718 */
    1819class Tests_Comment_IsAvatarCommentType extends WP_UnitTestCase {
  • trunk/tests/phpunit/tests/comment/lastCommentModified.php

    r50337 r53863  
    44 * @group comment
    55 * @ticket 38027
     6 *
     7 * @covers ::get_lastcommentmodified
    68 */
    79class Tests_Comment_Last_Modified extends WP_UnitTestCase {
  • trunk/tests/phpunit/tests/comment/metaCache.php

    r51331 r53863  
    11<?php
    2 
     2/**
     3 * @group comment
     4 */
    35class Tests_Comment_Meta_Cache extends WP_UnitTestCase {
    46        protected $i       = 0;
    … …  
    79        /**
    810         * @ticket 16894
     11         *
     12         * @covers ::update_comment_meta
    913         */
    1014        public function test_update_comment_meta_cache_should_default_to_true() {
    … …  
    3741        /**
    3842         * @ticket 16894
     43         *
     44         * @covers ::update_comment_meta
    3945         */
    4046        public function test_update_comment_meta_cache_true() {
    … …  
    6874        /**
    6975         * @ticket 16894
     76         *
     77         * @covers ::update_comment_meta
    7078         */
    7179        public function test_update_comment_meta_cache_false() {
    … …  
    96104        /**
    97105         * @ticket 16894
     106         *
     107         * @covers ::get_comment_meta
    98108         */
    99109        public function test_comment_meta_should_be_lazy_loaded_for_all_comments_in_comments_template() {
    … …  
    131141        /**
    132142         * @ticket 34047
     143         *
     144         * @covers ::get_comment_meta
    133145         */
    134146        public function test_comment_meta_should_be_lazy_loaded_in_comment_feed_queries() {
    … …  
    179191        /**
    180192         * @ticket 34047
     193         *
     194         * @covers ::get_comment_meta
    181195         */
    182196        public function test_comment_meta_should_be_lazy_loaded_in_single_post_comment_feed_queries() {
    … …  
    228242        /**
    229243         * @ticket 44467
     244         *
     245         * @covers ::add_metadata
    230246         */
    231247        public function test_add_metadata_sets_comments_last_changed() {
    … …  
    240256        /**
    241257         * @ticket 44467
     258         *
     259         * @covers ::update_metadata
    242260         */
    243261        public function test_update_metadata_sets_comments_last_changed() {
    … …  
    252270        /**
    253271         * @ticket 44467
     272         *
     273         * @covers ::delete_metadata
    254274         */
    255275        public function test_delete_metadata_sets_comments_last_changed() {
  • trunk/tests/phpunit/tests/comment/query.php

    r53291 r53863  
    1414        }
    1515
     16        /**
     17         * @covers WP_Comment_Query::query
     18         */
    1619        public function test_query() {
    1720                $c1 = self::factory()->comment->create(
    … …  
    6063        }
    6164
     65        /**
     66         * @covers WP_Comment_Query::query
     67         */
    6268        public function test_query_post_id_0() {
    6369                $c1 = self::factory()->comment->create(
    … …  
    8187        /**
    8288         * @ticket 12668
     89         *
     90         * @covers WP_Comment_Query::query
    8391         */
    8492        public function test_query_type_empty_string() {
    … …  
    131139        /**
    132140         * @ticket 12668
     141         *
     142         * @covers WP_Comment_Query::query
    133143         */
    134144        public function test_query_type_comment() {
    … …  
    179189        }
    180190
     191        /**
     192         * @covers WP_Comment_Query::query
     193         */
    181194        public function test_query_type_pingback() {
    182195                $c1 = self::factory()->comment->create(
    … …  
    220233        }
    221234
     235        /**
     236         * @covers WP_Comment_Query::query
     237         */
    222238        public function test_query_type_trackback() {
    223239                $c1 = self::factory()->comment->create(
    … …  
    263279        /**
    264280         * 'pings' is an alias for 'trackback' + 'pingback'.
     281         *
     282         * @covers WP_Comment_Query::query
    265283         */
    266284        public function test_query_type_pings() {
    … …  
    315333         *
    316334         * @ticket 12668
     335         *
     336         * @covers WP_Comment_Query::query
    317337         */
    318338        public function test_type_array_comments_and_custom() {
    … …  
    372392        /**
    373393         * @ticket 12668
     394         *
     395         * @covers WP_Comment_Query::query
    374396         */
    375397        public function test_type_not__in_array_custom() {
    … …  
    429451        /**
    430452         * @ticket 12668
     453         *
     454         * @covers WP_Comment_Query::query
    431455         */
    432456        public function test_type__in_array_and_not_type_array_custom() {
    … …  
    487511        /**
    488512         * @ticket 12668
     513         *
     514         * @covers WP_Comment_Query::query
    489515         */
    490516        public function test_type_array_and_type__not_in_array_custom() {
    … …  
    545571        /**
    546572         * @ticket 12668
     573         *
     574         * @covers WP_Comment_Query::query
    547575         */
    548576        public function test_type__not_in_custom() {
    … …  
    602630        /**
    603631         * @ticket 12668
     632         *
     633         * @covers WP_Comment_Query::query
    604634         */
    605635        public function test_type_array_comments_and_pings() {
    … …  
    652682        /**
    653683         * @ticket 12668
     684         *
     685         * @covers WP_Comment_Query::query
    654686         */
    655687        public function test_type_array_comment_pings() {
    … …  
    688720        /**
    689721         * @ticket 12668
     722         *
     723         * @covers WP_Comment_Query::query
    690724         */
    691725        public function test_type_array_pingback() {
    … …  
    724758        /**
    725759         * @ticket 12668
     760         *
     761         * @covers WP_Comment_Query::query
    726762         */
    727763        public function test_type_array_custom_pingpack() {
    … …  
    760796        /**
    761797         * @ticket 12668
     798         *
     799         * @covers WP_Comment_Query::query
    762800         */
    763801        public function test_type_array_pings() {
    … …  
    796834        /**
    797835         * @ticket 12668
     836         *
     837         * @covers WP_Comment_Query::query
    798838         */
    799839        public function test_type_status_approved_array_comment_pings() {
    … …  
    840880        /**
    841881         * @ticket 12668
     882         *
     883         * @covers WP_Comment_Query::query
    842884         */
    843885        public function test_type_array_trackback() {
    … …  
    876918        /**
    877919         * @ticket 12668
     920         *
     921         * @covers WP_Comment_Query::query
    878922         */
    879923        public function test_type_array_custom_trackback() {
    … …  
    912956        /**
    913957         * @ticket 12668
     958         *
     959         * @covers WP_Comment_Query::query
    914960         */
    915961        public function test_type_array_pings_approved() {
    … …  
    9561002        /**
    9571003         * @ticket 29612
     1004         *
     1005         * @covers WP_Comment_Query::query
    9581006         */
    9591007        public function test_status_empty_string() {
    … …  
    9901038        /**
    9911039         * @ticket 21101
     1040         *
     1041         * @covers WP_Comment_Query::query
    9921042         */
    9931043        public function test_status_hold() {
    … …  
    10181068        /**
    10191069         * @ticket 21101
     1070         *
     1071         * @covers WP_Comment_Query::query
    10201072         */
    10211073        public function test_status_approve() {
    … …  
    10441096        }
    10451097
     1098        /**
     1099         * @covers WP_Comment_Query::query
     1100         */
    10461101        public function test_status_custom() {
    10471102                $c1 = self::factory()->comment->create(
    … …  
    10751130        }
    10761131
     1132        /**
     1133         * @covers WP_Comment_Query::query
     1134         */
    10771135        public function test_status_all() {
    10781136                $c1 = self::factory()->comment->create(
    … …  
    11061164        }
    11071165
     1166        /**
     1167         * @covers WP_Comment_Query::query
     1168         */
    11081169        public function test_status_default_to_all() {
    11091170                $c1 = self::factory()->comment->create(
    … …  
    11381199        /**
    11391200         * @ticket 29612
     1201         *
     1202         * @covers WP_Comment_Query::query
    11401203         */
    11411204        public function test_status_comma_any() {
    … …  
    11721235        /**
    11731236         * @ticket 29612
     1237         *
     1238         * @covers WP_Comment_Query::query
    11741239         */
    11751240        public function test_status_comma_separated() {
    … …  
    12061271        /**
    12071272         * @ticket 29612
     1273         *
     1274         * @covers WP_Comment_Query::query
    12081275         */
    12091276        public function test_status_array() {
    … …  
    12401307        /**
    12411308         * @ticket 35478
     1309         *
     1310         * @covers WP_Comment_Query::__construct
    12421311         */
    12431312        public function test_multiple_post_fields_should_all_be_respected() {
    … …  
    12851354        }
    12861355
     1356        /**
     1357         * @covers ::get_comments
     1358         */
    12871359        public function test_get_comments_for_post() {
    12881360                $limit = 5;
    … …  
    13441416        /**
    13451417         * @ticket 21003
     1418         *
     1419         * @covers ::get_comments
    13461420         */
    13471421        public function test_orderby_meta() {
    … …  
    14361510        /**
    14371511         * @ticket 30478
     1512         *
     1513         * @covers WP_Comment_Query::query
    14381514         */
    14391515        public function test_orderby_clause_key() {
    … …  
    14631539        /**
    14641540         * @ticket 30478
     1541         *
     1542         * @covers WP_Comment_Query::query
    14651543         */
    14661544        public function test_orderby_clause_key_as_secondary_sort() {
    … …  
    15071585        /**
    15081586         * @ticket 30478
     1587         *
     1588         * @covers WP_Comment_Query::query
    15091589         */
    15101590        public function test_orderby_more_than_one_clause_key() {
    … …  
    15441624        /**
    15451625         * @ticket 32081
     1626         *
     1627         * @covers WP_Comment_Query::__construct
     1628         * @covers WP_Comment_Query::get_comments
    15461629         */
    15471630        public function test_meta_query_should_work_with_comment__in() {
    … …  
    15701653        /**
    15711654         * @ticket 32081
     1655         *
     1656         * @covers WP_Comment_Query::__construct
     1657         * @covers WP_Comment_Query::get_comments
    15721658         */
    15731659        public function test_meta_query_should_work_with_comment__not_in() {
    … …  
    15961682        /**
    15971683         * @ticket 27064
     1684         *
     1685         * @covers ::get_comments
    15981686         */
    15991687        public function test_get_comments_by_user() {
    … …  
    16501738        /**
    16511739         * @ticket 35377
     1740         *
     1741         * @covers ::get_comments
    16521742         */
    16531743        public function test_get_comments_by_author_url() {
    … …  
    16891779        /**
    16901780         * @ticket 28434
     1781         *
     1782         * @covers ::get_comments
    16911783         */
    16921784        public function test_fields_ids_query() {
    … …  
    17251817        /**
    17261818         * @ticket 29189
     1819         *
     1820         * @covers ::get_comments
    17271821         */
    17281822        public function test_fields_comment__in() {
    … …  
    17611855        /**
    17621856         * @ticket 29189
     1857         *
     1858         * @covers ::get_comments
    17631859         */
    17641860        public function test_fields_comment__not_in() {
    … …  
    17971893        /**
    17981894         * @ticket 29189
     1895         *
     1896         * @covers ::get_comments
    17991897         */
    18001898        public function test_fields_post__in() {
    … …  
    18371935        /**
    18381936         * @ticket 29189
     1937         *
     1938         * @covers ::get_comments
    18391939         */
    18401940        public function test_fields_post__not_in() {
    … …  
    18771977        /**
    18781978         * @ticket 29885
     1979         *
     1980         * @covers ::get_comments
    18791981         */
    18801982        public function test_fields_post_author__in() {
    … …  
    19202022        /**
    19212023         * @ticket 29885
     2024         *
     2025         * @covers ::get_comments
    19222026         */
    19232027        public function test_fields_post_author__not_in() {
    … …  
    19632067                /**
    19642068                 * @ticket 29885
     2069                 *
     2070                 * @covers ::get_comments
    19652071                 */
    19662072        public function test_fields_author__in() {
    … …  
    20112117                /**
    20122118                 * @ticket 29885
     2119                 *
     2120                 * @covers ::get_comments
    20132121                 */
    20142122        public function test_fields_author__not_in() {
    … …  
    20592167        /**
    20602168         * @ticket 19623
     2169         *
     2170         * @covers ::get_comments
    20612171         */
    20622172        public function test_get_comments_with_status_all() {
    … …  
    20902200        /**
    20912201         * @ticket 19623
     2202         *
     2203         * @covers ::get_comments
    20922204         */
    20932205        public function test_get_comments_with_include_unapproved_user_id() {
    … …  
    21342246        /**
    21352247         * @ticket 19623
     2248         *
     2249         * @covers ::get_comments
    21362250         */
    21372251        public function test_get_comments_with_include_unapproved_user_id_array() {
    … …  
    21852299        /**
    21862300         * @ticket 19623
     2301         *
     2302         * @covers ::get_comments
    21872303         */
    21882304        public function test_get_comments_with_include_unapproved_user_id_comma_separated() {
    … …  
    22362352        /**
    22372353         * @ticket 19623
     2354         *
     2355         * @covers ::get_comments
    22382356         */
    22392357        public function test_get_comments_with_include_unapproved_author_email() {
    … …  
    22862404        /**
    22872405         * @ticket 19623
     2406         *
     2407         * @covers ::get_comments
    22882408         */
    22892409        public function test_get_comments_with_include_unapproved_mixed_array() {
    … …  
    23452465        /**
    23462466         * @ticket 19623
     2467         *
     2468         * @covers ::get_comments
    23472469         */
    23482470        public function test_get_comments_with_include_unapproved_mixed_comma_separated() {
    … …  
    24022524        }
    24032525
     2526        /**
     2527         * @covers WP_Comment_Query::query
     2528         */
    24042529        public function test_search() {
    24052530                $c1 = self::factory()->comment->create(
    … …  
    24772602        /**
    24782603         * @ticket 35513
     2604         *
     2605         * @covers WP_Comment_Query::query
    24792606         */
    24802607        public function test_search_false_should_be_ignored() {
    … …  
    24902617        /**
    24912618         * @ticket 35513
     2619         *
     2620         * @covers WP_Comment_Query::query
    24922621         */
    24932622        public function test_search_null_should_be_ignored() {
    … …  
    25032632        /**
    25042633         * @ticket 35513
     2634         *
     2635         * @covers WP_Comment_Query::query
    25052636         */
    25062637        public function test_search_empty_string_should_be_ignored() {
    … …  
    25162647        /**
    25172648         * @ticket 35513
     2649         *
     2650         * @covers WP_Comment_Query::query
    25182651         */
    25192652        public function test_search_int_0_should_not_be_ignored() {
    … …  
    25302663        /**
    25312664         * @ticket 35513
     2665         *
     2666         * @covers WP_Comment_Query::query
    25322667         */
    25332668        public function test_search_string_0_should_not_be_ignored() {
    … …  
    25422677        }
    25432678
     2679        /**
     2680         * @covers WP_Comment_Query::query
     2681         */
    25442682        public function test_orderby_default() {
    25452683                global $wpdb;
    … …  
    25512689        }
    25522690
     2691        /**
     2692         * @covers WP_Comment_Query::query
     2693         */
    25532694        public function test_orderby_single() {
    25542695                global $wpdb;
    … …  
    25642705        }
    25652706
     2707        /**
     2708         * @covers WP_Comment_Query::query
     2709         */
    25662710        public function test_orderby_single_invalid() {
    25672711                global $wpdb;
    … …  
    25772721        }
    25782722
     2723        /**
     2724         * @covers WP_Comment_Query::query
     2725         */
    25792726        public function test_orderby_space_separated() {
    25802727                global $wpdb;
    … …  
    25902737        }
    25912738
     2739        /**
     2740         * @covers WP_Comment_Query::query
     2741         */
    25922742        public function test_orderby_comma_separated() {
    25932743                global $wpdb;
    … …  
    26032753        }
    26042754
     2755        /**
     2756         * @covers WP_Comment_Query::query
     2757         */
    26052758        public function test_orderby_flat_array() {
    26062759                global $wpdb;
    … …  
    26162769        }
    26172770
     2771        /**
     2772         * @covers WP_Comment_Query::query
     2773         */
    26182774        public function test_orderby_array_contains_invalid_item() {
    26192775                global $wpdb;
    … …  
    26292785        }
    26302786
     2787        /**
     2788         * @covers WP_Comment_Query::query
     2789         */
    26312790        public function test_orderby_array_contains_all_invalid_items() {
    26322791                global $wpdb;
    … …  
    26442803        /**
    26452804         * @ticket 29902
     2805         *
     2806         * @covers WP_Comment_Query::query
    26462807         */
    26472808        public function test_orderby_none() {
    … …  
    26582819        /**
    26592820         * @ticket 29902
     2821         *
     2822         * @covers WP_Comment_Query::query
    26602823         */
    26612824        public function test_orderby_empty_array() {
    … …  
    26722835        /**
    26732836         * @ticket 29902
     2837         *
     2838         * @covers WP_Comment_Query::query
    26742839         */
    26752840        public function test_orderby_false() {
    … …  
    26862851        /**
    26872852         * @ticket 30478
     2853         *
     2854         * @covers WP_Comment_Query::query
    26882855         */
    26892856        public function test_orderby_array() {
    … …  
    27072874        /**
    27082875         * @ticket 30478
     2876         *
     2877         * @covers WP_Comment_Query::query
    27092878         */
    27102879        public function test_orderby_array_should_discard_invalid_columns() {
    … …  
    27282897        /**
    27292898         * @ticket 30478
     2899         *
     2900         * @covers WP_Comment_Query::query
    27302901         */
    27312902        public function test_orderby_array_should_convert_invalid_order_to_DESC() {
    … …  
    27492920        /**
    27502921         * @ticket 30478
     2922         *
     2923         * @covers WP_Comment_Query::query
    27512924         */
    27522925        public function test_orderby_array_should_sort_by_comment_ID_as_fallback_and_should_inherit_order_from_comment_date_gmt() {
    … …  
    27692942        /**
    27702943         * @ticket 30478
     2944         *
     2945         * @covers WP_Comment_Query::query
    27712946         */
    27722947        public function test_orderby_array_should_sort_by_comment_ID_as_fallback_and_should_inherit_order_from_comment_date() {
    … …  
    27892964        /**
    27902965         * @ticket 30478
     2966         *
     2967         * @covers WP_Comment_Query::query
    27912968         */
    27922969        public function test_orderby_array_should_sort_by_comment_ID_DESC_as_fallback_when_not_sorted_by_date() {
    … …  
    28082985        /**
    28092986         * @ticket 30478
     2987         *
     2988         * @covers WP_Comment_Query::query
    28102989         */
    28112990        public function test_orderby_date_modified_gmt_should_order_by_comment_ID_in_case_of_tie_ASC() {
    … …  
    28333012        /**
    28343013         * @ticket 30478
     3014         *
     3015         * @covers WP_Comment_Query::query
    28353016         */
    28363017        public function test_orderby_date_modified_gmt_should_order_by_comment_ID_in_case_of_tie_DESC() {
    … …  
    28583039        }
    28593040
     3041        /**
     3042         * @covers WP_Comment_Query::query
     3043         */
    28603044        public function test_meta_vars_should_be_converted_to_meta_query() {
    28613045                $q = new WP_Comment_Query();
    … …  
    28753059        }
    28763060
     3061        /**
     3062         * @covers WP_Comment_Query::query
     3063         */
    28773064        public function test_count() {
    28783065                $c1 = self::factory()->comment->create(
    … …  
    29013088        /**
    29023089         * @ticket 23369
     3090         *
     3091         * @covers WP_Comment_Query::query
    29033092         */
    29043093        public function test_count_with_meta_query() {
    … …  
    29423131        /**
    29433132         * @ticket 38268
     3133         *
     3134         * @covers WP_Comment_Query::query
    29443135         */
    29453136        public function test_paged() {
    … …  
    29883179        /**
    29893180         * @ticket 38268
     3181         *
     3182         * @covers WP_Comment_Query::query
    29903183         */
    29913184        public function test_offset_should_take_precedence_over_paged() {
    … …  
    30343227        }
    30353228
     3229        /**
     3230         * @covers WP_Comment_Query::query
     3231         */
    30363232        public function test_post_type_single_value() {
    30373233                register_post_type( 'post-type-1' );
    … …  
    30603256        /**
    30613257         * @ticket 20006
     3258         *
     3259         * @covers WP_Comment_Query::query
    30623260         */
    30633261        public function test_post_type_singleton_array() {
    … …  
    30873285        /**
    30883286         * @ticket 20006
     3287         *
     3288         * @covers WP_Comment_Query::query
    30893289         */
    30903290        public function test_post_type_array() {
    … …  
    31123312        }
    31133313
     3314        /**
     3315         *
     3316         * @covers WP_Comment_Query::query
     3317         */
    31143318        public function test_post_name_single_value() {
    31153319                $p1 = self::factory()->post->create( array( 'post_name' => 'foo' ) );
    … …  
    31323336        /**
    31333337         * @ticket 20006
     3338         *
     3339         * @covers WP_Comment_Query::query
    31343340         */
    31353341        public function test_post_name_singleton_array() {
    … …  
    31533359        /**
    31543360         * @ticket 20006
     3361         *
     3362         * @covers WP_Comment_Query::query
    31553363         */
    31563364        public function test_post_name_array() {
    … …  
    31743382        }
    31753383
     3384        /**
     3385         * @covers WP_Comment_Query::query
     3386         */
    31763387        public function test_post_status_single_value() {
    31773388                $p1 = self::factory()->post->create( array( 'post_status' => 'publish' ) );
    … …  
    31943405        /**
    31953406         * @ticket 20006
     3407         *
     3408         * @covers WP_Comment_Query::query
    31963409         */
    31973410        public function test_post_status_singleton_array() {
    … …  
    32153428        /**
    32163429         * @ticket 20006
     3430         *
     3431         * @covers WP_Comment_Query::query
    32173432         */
    32183433        public function test_post_status_array() {
    … …  
    32383453        /**
    32393454         * @ticket 35512
     3455         *
     3456         * @covers WP_Comment_Query::query
    32403457         */
    32413458        public function test_post_type_any_should_override_other_post_types() {
    … …  
    32613478        /**
    32623479         * @ticket 35512
     3480         *
     3481         * @covers WP_Comment_Query::query
    32633482         */
    32643483        public function test_post_type_any_as_part_of_an_array_of_post_types() {
    … …  
    32843503        /**
    32853504         * @ticket 35512
     3505         *
     3506         * @covers WP_Comment_Query::query
    32863507         */
    32873508        public function test_post_status_any_should_override_other_post_statuses() {
    … …  
    33043525        /**
    33053526         * @ticket 35512
     3527         *
     3528         * @covers WP_Comment_Query::query
    33063529         */
    33073530        public function test_post_status_any_as_part_of_an_array_of_post_statuses() {
    … …  
    33243547        /**
    33253548         * @ticket 24826
     3549         *
     3550         * @covers WP_Comment_Query::__construct
     3551         * @covers WP_Comment_Query::get_comments
    33263552         */
    33273553        public function test_comment_query_object() {
    … …  
    33443570        /**
    33453571         * @ticket 22400
     3572         *
     3573         * @covers WP_Comment_Query::query
    33463574         */
    33473575        public function test_comment_cache_key_should_ignore_custom_params() {
    … …  
    33753603        /**
    33763604         * @ticket 35677
     3605         *
     3606         * @covers WP_Comment_Query::__construct
    33773607         */
    33783608        public function test_cache_should_be_sensitive_to_parent__in() {
    … …  
    33983628        /**
    33993629         * @ticket 35677
     3630         *
     3631         * @covers WP_Comment_Query::__construct
    34003632         */
    34013633        public function test_cache_should_be_sensitive_to_parent__not_in() {
    … …  
    34213653        /**
    34223654         * @ticket 32762
     3655         *
     3656         * @covers WP_Comment_Query::__construct
    34233657         */
    34243658        public function test_it_should_be_possible_to_modify_meta_query_using_pre_get_comments_action() {
    … …  
    34593693        /**
    34603694         * @ticket 32762
     3695         *
     3696         * @covers WP_Comment_Query::__construct
    34613697         */
    34623698        public function test_it_should_be_possible_to_modify_meta_params_using_pre_get_comments_action() {
    … …  
    34913727        /**
    34923728         * @ticket 33882
     3729         *
     3730         * @covers WP_Comment_Query::__construct
    34933731         */
    34943732        public function test_parent__in() {
    … …  
    35203758        /**
    35213759         * @ticket 33882
     3760         *
     3761         * @covers WP_Comment_Query::__construct
    35223762         */
    35233763        public function test_parent__in_commas() {
    … …  
    35623802        /**
    35633803         * @ticket 33882
     3804         *
     3805         * @covers WP_Comment_Query::__construct
    35643806         */
    35653807        public function test_parent__not_in() {
    … …  
    35923834        /**
    35933835         * @ticket 33882
     3836         *
     3837         * @covers WP_Comment_Query::__construct
    35943838         */
    35953839        public function test_parent__not_in_commas() {
    … …  
    36353879        /**
    36363880         * @ticket 33883
     3881         *
     3882         * @covers WP_Comment_Query::__construct
    36373883         */
    36383884        public function test_orderby_comment__in() {
    … …  
    36783924        /**
    36793925         * @ticket 8071
     3926         *
     3927         * @covers WP_Comment_Query::__construct
    36803928         */
    36813929        public function test_no_found_rows_should_default_to_true() {
    … …  
    36953943        /**
    36963944         * @ticket 8071
     3945         *
     3946         * @covers WP_Comment_Query::__construct
    36973947         */
    36983948        public function test_should_respect_no_found_rows_true() {
    … …  
    37133963        /**
    37143964         * @ticket 8071
     3965         *
     3966         * @covers WP_Comment_Query::__construct
    37153967         */
    37163968        public function test_should_respect_no_found_rows_false() {
    … …  
    37313983        /**
    37323984         * @ticket 37184
     3985         *
     3986         * @covers WP_Comment_Query::__construct
    37333987         */
    37343988        public function test_found_rows_should_be_fetched_from_the_cache() {
    … …  
    37584012        /**
    37594013         * @ticket 8071
     4014         *
     4015         * @covers WP_Comment_Query::__construct
    37604016         */
    37614017        public function test_hierarchical_should_skip_child_comments_in_offset() {
    … …  
    38004056        /**
    38014057         * @ticket 8071
     4058         *
     4059         * @covers WP_Comment_Query::__construct
    38024060         */
    38034061        public function test_hierarchical_should_not_include_child_comments_in_number() {
    … …  
    38404098        /**
    38414099         * @ticket 8071
     4100         *
     4101         * @covers WP_Comment_Query::__construct
    38424102         */
    38434103        public function test_hierarchical_threaded() {
    … …  
    39184178        /**
    39194179         * @ticket 8071
     4180         *
     4181         * @covers WP_Comment_Query::__construct
    39204182         */
    39214183        public function test_hierarchical_threaded_approved() {
    … …  
    39944256        /**
    39954257         * @ticket 35192
     4258         *
     4259         * @covers WP_Comment_Query::__construct
    39964260         */
    39974261        public function test_comment_clauses_prepend_callback_should_be_respected_when_filling_descendants() {
    … …  
    40514315        /**
    40524316         * @ticket 35192
     4317         *
     4318         * @covers WP_Comment_Query::__construct
    40534319         */
    40544320        public function test_comment_clauses_append_callback_should_be_respected_when_filling_descendants() {
    … …  
    41084374        /**
    41094375         * @ticket 36487
     4376         *
     4377         * @covers WP_Comment_Query::__construct
    41104378         */
    41114379        public function test_cache_should_be_hit_when_querying_descendants() {
    … …  
    41644432        /**
    41654433         * @ticket 37696
     4434         *
     4435         * @covers WP_Comment_Query::__construct
    41664436         */
    41674437        public function test_hierarchy_should_be_filled_when_cache_is_incomplete() {
    … …  
    42264496         * @ticket 37966
    42274497         * @ticket 37696
     4498         *
     4499         * @covers WP_Comment_Query::query
    42284500         */
    42294501        public function test_fill_hierarchy_should_disregard_offset_and_number() {
    … …  
    42934565        /**
    42944566         * @ticket 27571
     4567         *
     4568         * @covers WP_Comment_Query::__construct
    42954569         */
    42964570        public function test_update_comment_post_cache_should_be_disabled_by_default() {
    … …  
    43134587        /**
    43144588         * @ticket 27571
     4589         *
     4590         * @covers WP_Comment_Query::__construct
    43154591         */
    43164592        public function test_should_respect_update_comment_post_cache_true() {
    … …  
    43344610        /**
    43354611         * @ticket 34138
     4612         *
     4613         * @covers WP_Comment_Query::__construct
    43364614         */
    43374615        public function test_comment_objects_should_be_filled_from_cache() {
    … …  
    43624640        /**
    43634641         * @ticket 34138
     4642         *
     4643         * @covers WP_Comment_Query::__construct
    43644644         */
    43654645        public function test_comment_objects_should_be_fetched_from_database_when_suspend_cache_addition() {
    … …  
    43814661        }
    43824662
     4663        /**
     4664         * @covers WP_Comment_Query::__construct
     4665         */
    43834666        public function test_comment_query_should_be_cached() {
    43844667                global $wpdb;
    … …  
    44114694        }
    44124695
     4696        /**
     4697         * @covers WP_Comment_Query::__construct
     4698         */
    44134699        public function test_created_comment_should_invalidate_query_cache() {
    44144700                global $wpdb;
    … …  
    44414727        }
    44424728
     4729        /**
     4730         * @covers WP_Comment_Query::__construct
     4731         */
    44434732        public function test_updated_comment_should_invalidate_query_cache() {
    44444733                global $wpdb;
    … …  
    44814770        }
    44824771
     4772        /**
     4773         * @covers WP_Comment_Query::__construct
     4774         */
    44834775        public function test_deleted_comment_should_invalidate_query_cache() {
    44844776                global $wpdb;
    … …  
    45144806        }
    45154807
     4808        /**
     4809         * @covers WP_Comment_Query::__construct
     4810         */
    45164811        public function test_trashed_comment_should_invalidate_query_cache() {
    45174812                global $wpdb;
    … …  
    45474842        }
    45484843
     4844        /**
     4845         * @covers WP_Comment_Query::__construct
     4846         */
    45494847        public function test_untrashed_comment_should_invalidate_query_cache() {
    45504848                global $wpdb;
    … …  
    45824880        }
    45834881
     4882        /**
     4883         * @covers WP_Comment_Query::__construct
     4884         */
    45844885        public function test_spammed_comment_should_invalidate_query_cache() {
    45854886                global $wpdb;
    … …  
    46154916        }
    46164917
     4918        /**
     4919         * @covers WP_Comment_Query::__construct
     4920         */
    46174921        public function test_unspammed_comment_should_invalidate_query_cache() {
    46184922                global $wpdb;
    … …  
    46524956        /**
    46534957         * @ticket 41348
     4958         *
     4959         * @covers WP_Comment_Query::query
    46544960         */
    46554961        public function test_count_query_should_miss_noncount_cache() {
    … …  
    46814987        /**
    46824988         * @ticket 41348
     4989         *
     4990         * @covers WP_Comment_Query::query
    46834991         */
    46844992        public function test_count_query_should_hit_count_cache() {
    … …  
    47105018        /**
    47115019         * @ticket 41348
     5020         *
     5021         * @covers WP_Comment_Query::query
    47125022         */
    47135023        public function test_different_values_of_fields_should_share_cached_values() {
    … …  
    47385048        /**
    47395049         * @ticket 40669
     5050         *
     5051         * @covers ::get_comments
    47405052         */
    47415053        public function test_add_comment_meta_should_invalidate_query_cache() {
    … …  
    47875099        /**
    47885100         * @ticket 40669
     5101         *
     5102         * @covers ::get_comments
    47895103         */
    47905104        public function test_update_comment_meta_should_invalidate_query_cache() {
    … …  
    48365150        /**
    48375151         * @ticket 40669
     5152         *
     5153         * @covers ::get_comments
    48385154         */
    48395155        public function test_delete_comment_meta_should_invalidate_query_cache() {
    … …  
    48855201        /**
    48865202         * @ticket 45800
     5203         *
     5204         * @covers WP_Comment_Query::query
    48875205         */
    48885206        public function test_comments_pre_query_filter_should_bypass_database_query() {
    … …  
    49165234        /**
    49175235         * @ticket 50521
     5236         *
     5237         * @covers WP_Comment_Query::query
    49185238         */
    49195239        public function test_comments_pre_query_filter_should_set_comments_property() {
    … …  
    49455265        /**
    49465266         * @ticket 55460
     5267         *
     5268         * @covers WP_Comment_Query::__construct
    49475269         */
    49485270        public function test_comment_cache_key_should_ignore_unset_params() {
    … …  
    49725294        /**
    49735295         * @ticket 55218
     5296         *
     5297         * @covers WP_Comment_Query::__construct
    49745298         */
    49755299        public function test_unapproved_comment_with_meta_query_does_not_trigger_ambiguous_identifier_error() {
  • trunk/tests/phpunit/tests/comment/slashes.php

    r53557 r53863  
    3838        /**
    3939         * Tests the extended model function that expects slashed data.
     40         *
     41         * @covers ::wp_new_comment
    4042         */
    4143        public function test_wp_new_comment() {
    … …  
    7779        /**
    7880         * Tests the controller function that expects slashed data.
     81         *
     82         * @covers ::edit_comment
    7983         */
    8084        public function test_edit_comment() {
    … …  
    123127        /**
    124128         * Tests the model function that expects slashed data.
     129         *
     130         * @covers ::wp_insert_comment
    125131         */
    126132        public function test_wp_insert_comment() {
    … …  
    154160        /**
    155161         * Tests the model function that expects slashed data.
     162         *
     163         * @covers ::wp_update_comment
    156164         */
    157165        public function test_wp_update_comment() {
  • trunk/tests/phpunit/tests/comment/template.php

    r52010 r53863  
    2020        }
    2121
     22        /**
     23         * @covers ::get_comments_number
     24         */
    2225        public function test_get_comments_number() {
    2326                $post_id = self::$post_id;
    … …  
    3336        }
    3437
     38        /**
     39         * @covers ::get_comments_number
     40         */
    3541        public function test_get_comments_number_without_arg() {
    3642                $post_id   = self::$post_id;
    … …  
    4854        /**
    4955         * @ticket 48772
     56         *
     57         * @covers ::get_comments_number_text
    5058         */
    5159        public function test_get_comments_number_text_with_post_id() {
    … …  
    6775        /**
    6876         * @ticket 13651
     77         *
     78         * @covers ::get_comments_number_text
    6979         */
    7080        public function test_get_comments_number_text_declension_with_default_args() {
    … …  
    90100         * @ticket 13651
    91101         * @dataProvider data_get_comments_number_text_declension
     102         *
     103         * @covers ::get_comments_number_text
    92104         */
    93105        public function test_get_comments_number_text_declension_with_custom_args( $number, $input, $output ) {
  • trunk/tests/phpunit/tests/comment/walker.php

    r52010 r53863  
    33/**
    44 * @group comment
     5 *
     6 * @covers ::wp_list_comments
    57 */
    68class Tests_Comment_Walker extends WP_UnitTestCase {
  • trunk/tests/phpunit/tests/comment/wpAllowComment.php

    r49603 r53863  
    33/**
    44 * @group comment
     5 *
     6 * @covers ::wp_allow_comment
    57 */
    68class Tests_Comment_WpAllowComment extends WP_UnitTestCase {
  • trunk/tests/phpunit/tests/comment/wpBatchUpdateCommentType.php

    r48937 r53863  
    33/**
    44 * @group comment
     5 *
    56 * @covers ::_wp_batch_update_comment_type
    67 */
  • trunk/tests/phpunit/tests/comment/wpComment.php

    r49603 r53863  
    33/**
    44 * @group comment
     5 *
     6 * @covers WP_Comment::get_instance
    57 */
    68class Tests_Term_WpComment extends WP_UnitTestCase {
  • trunk/tests/phpunit/tests/comment/wpCountComments.php

    r48937 r53863  
    11<?php
    22
     3/**
     4 * @group comment
     5 *
     6 * Class Tests_WP_Count_Comments
     7 *
     8 * @covers ::wp_count_comments
     9 */
    310class Tests_WP_Count_Comments extends WP_UnitTestCase {
    411
  • trunk/tests/phpunit/tests/comment/wpListComments.php

    r47122 r53863  
    33/**
    44 * @group comment
     5 *
     6 * @covers ::wp_list_comments
    57 */
    68class Tests_Comment_WpListComments extends WP_UnitTestCase {
  • trunk/tests/phpunit/tests/comment/wpUpdateCommentCountNow.php

    r37447 r53863  
    33/**
    44 * @group  comment
     5 *
    56 * @covers ::wp_update_comment_count_now
    67 */
Note: See TracChangeset for help on using the changeset viewer.