Make WordPress Core

Changeset 54704


Ignore:
Timestamp:
10/27/2022 03:53:08 PM (20 months ago)
Author:
SergeyBiryukov
Message:

Tests: Rename classes in phpunit/tests/comment/ per the naming conventions.

https://make.wordpress.org/core/handbook/testing/automated-testing/writing-phpunit-tests/#naming-and-organization

Follow-up to [47780], [48911], [49327], [50291], [50292], [50342], [50452], [50453], [50456], [50967], [50968], [50969], [51491], [51492], [51493], [51623], [51639], [51646], [51650], [51651], [51860], [52264], [52265], [53489], [53863].

See #56793.

Location:
trunk/tests/phpunit/tests/comment
Files:
9 edited
2 moved

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/comment/getCommentAuthorUrl.php

    r53863 r54704  
    44 * @group comment
    55 *
    6  *@covers ::get_comment_author_url
     6 * @covers ::get_comment_author_url
    77 */
    88class Tests_Comment_GetCommentAuthorUrl extends WP_UnitTestCase {
  • trunk/tests/phpunit/tests/comment/getCommentCount.php

    r53863 r54704  
    44 * @group comment
    55 *
    6  * Class Tests_Get_Comment_Count
    7  *
    86 * @covers ::get_comment_count
    97 */
    10 class Tests_Get_Comment_Count extends WP_UnitTestCase {
     8class Tests_Comment_GetCommentCount extends WP_UnitTestCase {
    119
    1210    public function test_get_comment_count() {
  • trunk/tests/phpunit/tests/comment/getCommentExcerpt.php

    r53863 r54704  
    44 * @group comment
    55 *
    6  * Class Tests_Get_Comment_Excerpt
    7  *
    86 * @covers ::get_comment_excerpt
    97 */
    10 class Tests_Get_Comment_Excerpt extends WP_UnitTestCase {
     8class Tests_Comment_GetCommentExcerpt extends WP_UnitTestCase {
    119    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.
    1210
  • trunk/tests/phpunit/tests/comment/getLastCommentModified.php

    r54703 r54704  
    77 * @covers ::get_lastcommentmodified
    88 */
    9 class Tests_Comment_Last_Modified extends WP_UnitTestCase {
     9class Tests_Comment_GetLastCommentModified extends WP_UnitTestCase {
    1010    public function test_no_comments() {
    1111        $this->assertFalse( get_lastcommentmodified() );
  • trunk/tests/phpunit/tests/comment/metaCache.php

    r53863 r54704  
    33 * @group comment
    44 */
    5 class Tests_Comment_Meta_Cache extends WP_UnitTestCase {
     5class Tests_Comment_MetaCache extends WP_UnitTestCase {
    66    protected $i       = 0;
    77    protected $queries = 0;
  • trunk/tests/phpunit/tests/comment/query.php

    r54402 r54704  
    20812081    }
    20822082
    2083         /**
    2084         * @ticket 29885
    2085         *
    2086         * @covers ::get_comments
    2087         */
     2083    /**
     2084    * @ticket 29885
     2085    *
     2086    * @covers ::get_comments
     2087    */
    20882088    public function test_fields_author__in() {
    20892089        $p1 = self::factory()->post->create();
     
    21312131    }
    21322132
    2133         /**
    2134         * @ticket 29885
    2135         *
    2136         * @covers ::get_comments
    2137         */
     2133    /**
     2134    * @ticket 29885
     2135    *
     2136    * @covers ::get_comments
     2137    */
    21382138    public function test_fields_author__not_in() {
    21392139        $p1 = self::factory()->post->create();
     
    33293329
    33303330    /**
    3331      *
    33323331     * @covers WP_Comment_Query::query
    33333332     */
  • trunk/tests/phpunit/tests/comment/wpBatchUpdateCommentType.php

    r53863 r54704  
    66 * @covers ::_wp_batch_update_comment_type
    77 */
    8 class Tests_Batch_Update_Comment_Type extends WP_UnitTestCase {
     8class Tests_Comment_wpBatchUpdateCommentType extends WP_UnitTestCase {
    99
    1010    /**
  • trunk/tests/phpunit/tests/comment/wpCheckCommentDisallowedList.php

    r54703 r54704  
    33/**
    44 * @group comment
     5 *
     6 * @covers ::wp_check_comment_disallowed_list
    57 */
    6 class Tests_WP_Blocklist_Check extends WP_UnitTestCase {
     8class Tests_Comment_wpCheckCommentDisallowedList extends WP_UnitTestCase {
    79
    810    public function test_should_return_true_when_content_matches_disallowed_keys() {
  • trunk/tests/phpunit/tests/comment/wpComment.php

    r53863 r54704  
    66 * @covers WP_Comment::get_instance
    77 */
    8 class Tests_Term_WpComment extends WP_UnitTestCase {
     8class Tests_Comment_WpComment extends WP_UnitTestCase {
    99    protected static $comment_id;
    1010
  • trunk/tests/phpunit/tests/comment/wpCountComments.php

    r53863 r54704  
    44 * @group comment
    55 *
    6  * Class Tests_WP_Count_Comments
    7  *
    86 * @covers ::wp_count_comments
    97 */
    10 class Tests_WP_Count_Comments extends WP_UnitTestCase {
     8class Tests_Comment_wpCountComments extends WP_UnitTestCase {
    119
    1210    public function test_wp_count_comments() {
  • trunk/tests/phpunit/tests/comment/wpUpdateCommentCountNow.php

    r53863 r54704  
    66 * @covers ::wp_update_comment_count_now
    77 */
    8 class Tests_Update_Comment_Count_Now extends WP_UnitTestCase {
    9     public function _return_100() {
    10         return 100;
    11     }
     8class Tests_Comment_wpUpdateCommentCountNow extends WP_UnitTestCase {
    129
    1310    public function test_invalid_post_bails_early() {
     
    5148        remove_filter( 'pre_wp_update_comment_count_now', array( $this, '_return_100' ) );
    5249    }
     50
     51    public function _return_100() {
     52        return 100;
     53    }
    5354}
Note: See TracChangeset for help on using the changeset viewer.