Make WordPress Core

Changeset 59979


Ignore:
Timestamp:
03/13/2025 06:21:37 PM (9 months ago)
Author:
SergeyBiryukov
Message:

Docs: Correct formatting for some inline comments in unit tests.

Follow-up to [54111], [56714], [58182], [59630], [59817], [59966].

See #62281.

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

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/general/paginateLinks.php

    r59966 r59979  
    380380        $links = paginate_links( $args );
    381381
    382         // Test page 1 link (should have trailing slash)
     382        // Test page 1 link (should have trailing slash).
    383383        $this->assertStringContainsString(
    384384            'href="http://example.org/category/test/"',
     
    387387        );
    388388
    389         // Test page 3 link (should have trailing slash)
     389        // Test page 3 link (should have trailing slash).
    390390        $this->assertStringContainsString(
    391391            'href="http://example.org/category/test/page/3/"',
     
    394394        );
    395395
    396         // Test previous link (should have trailing slash)
     396        // Test previous link (should have trailing slash).
    397397        $this->assertStringContainsString(
    398398            'class="prev page-numbers" href="http://example.org/category/test/"',
     
    418418        $links = paginate_links( $args );
    419419
    420         // Test page 1 link (should not have trailing slash)
     420        // Test page 1 link (should not have trailing slash).
    421421        $this->assertStringContainsString(
    422422            'href="http://example.org/category/test"',
     
    425425        );
    426426
    427         // Test page 3 link (should not have trailing slash)
     427        // Test page 3 link (should not have trailing slash).
    428428        $this->assertStringContainsString(
    429429            'href="http://example.org/category/test/page/3"',
     
    432432        );
    433433
    434         // Test previous link (should not have trailing slash)
     434        // Test previous link (should not have trailing slash).
    435435        $this->assertStringContainsString(
    436436            'class="prev page-numbers" href="http://example.org/category/test"',
  • trunk/tests/phpunit/tests/option/wpPrimeNetworkOptionCaches.php

    r58182 r59979  
    139139        $initial_query_count = get_num_queries();
    140140
    141         // Call the wp_prime_network_option_caches() function second time
     141        // Call the wp_prime_network_option_caches() function second time.
    142142        wp_prime_network_option_caches( $network_id, $options_to_prime );
    143143
  • trunk/tests/phpunit/tests/post/metaRevisions.php

    r57987 r59979  
    595595        );
    596596
    597         // Check the last revision for the post to see if the meta key was revisioned
     597        // Check the last revision for the post to see if the meta key was revisioned.
    598598        $revisions       = wp_get_post_revisions( $post_id );
    599599        $revision        = array_shift( $revisions );
  • trunk/tests/phpunit/tests/query/cacheResults.php

    r59919 r59979  
    17941794    public function test_query_cache_should_exclude_post_with_excluded_term() {
    17951795        $term_id = self::$t1;
    1796         // Post 0 has the term applied
     1796        // Post 0 has the term applied.
    17971797        $post_id = self::$posts[0];
    17981798
  • trunk/tests/phpunit/tests/rest-api/rest-global-styles-revisions-controller.php

    r59970 r59979  
    954954        wp_set_current_user( self::$admin_id );
    955955
    956         // Test offset
     956        // Test offset.
    957957        $request = new WP_REST_Request( 'GET', '/wp/v2/global-styles/' . self::$global_styles_id . '/revisions' );
    958958        $request->set_param( 'offset', 1 );
     
    965965        $this->assertEquals( 3, $response->get_headers()['X-WP-TotalPages'] );
    966966
    967         // Test paged
     967        // Test paged.
    968968        $request = new WP_REST_Request( 'GET', '/wp/v2/global-styles/' . self::$global_styles_id . '/revisions' );
    969969        $request->set_param( 'page', 2 );
     
    976976        $this->assertEquals( 2, $response->get_headers()['X-WP-TotalPages'] );
    977977
    978         // Test out of bounds
     978        // Test out of bounds.
    979979        $request = new WP_REST_Request( 'GET', '/wp/v2/global-styles/' . self::$global_styles_id . '/revisions' );
    980980        $request->set_param( 'page', 4 );
  • trunk/tests/phpunit/tests/rest-api/rest-posts-controller.php

    r59970 r59979  
    59405940    public function test_get_posts_with_pagination() {
    59415941
    5942         // Test offset
     5942        // Test offset.
    59435943        $request = new WP_REST_Request( 'GET', '/wp/v2/posts' );
    59445944        $request->set_param( 'offset', 1 );
     
    59515951        $this->assertEquals( 30, $response->get_headers()['X-WP-TotalPages'] );
    59525952
    5953         // Test paged
     5953        // Test paged.
    59545954        $request = new WP_REST_Request( 'GET', '/wp/v2/posts' );
    59555955        $request->set_param( 'page', 2 );
     
    59625962        $this->assertEquals( 15, $response->get_headers()['X-WP-TotalPages'] );
    59635963
    5964         // Test out of bounds
     5964        // Test out of bounds.
    59655965        $request = new WP_REST_Request( 'GET', '/wp/v2/posts' );
    59665966        $request->set_param( 'page', 4 );
  • trunk/tests/phpunit/tests/rest-api/rest-revisions-controller.php

    r59970 r59979  
    10501050     * @covers WP_REST_Revisions_Controller::get_items
    10511051     */
    1052     public function test_get_template_revisions_pagination() {
    1053         wp_set_current_user( self::$editor_id );
    1054 
    1055         // Test offset
     1052    public function test_get_revisions_pagination() {
     1053        wp_set_current_user( self::$editor_id );
     1054
     1055        // Test offset.
    10561056        $request = new WP_REST_Request( 'GET', '/wp/v2/posts/' . self::$post_id . '/revisions' );
    10571057        $request->set_param( 'offset', 1 );
     
    10641064        $this->assertEquals( $this->total_revisions, $response->get_headers()['X-WP-TotalPages'] );
    10651065
    1066         // Test paged
     1066        // Test paged.
    10671067        $request = new WP_REST_Request( 'GET', '/wp/v2/posts/' . self::$post_id . '/revisions' );
    10681068        $request->set_param( 'page', 2 );
     
    10751075        $this->assertEquals( (int) ceil( $this->total_revisions / 2 ), $response->get_headers()['X-WP-TotalPages'] );
    10761076
    1077         // Test out of bounds
     1077        // Test out of bounds.
    10781078        $request = new WP_REST_Request( 'GET', '/wp/v2/posts/' . self::$post_id . '/revisions' );
    10791079        $request->set_param( 'page', $this->total_revisions + 1 );
  • trunk/tests/phpunit/tests/rest-api/wpRestTemplateRevisionsController.php

    r59970 r59979  
    11921192        wp_set_current_user( self::$admin_id );
    11931193
    1194         // Test offset
     1194        // Test offset.
    11951195        $request = new WP_REST_Request( 'GET', '/wp/v2/templates/' . self::TEST_THEME . '/' . self::TEMPLATE_NAME . '/revisions' );
    11961196        $request->set_param( 'offset', 1 );
     
    12031203        $this->assertEquals( 4, $response->get_headers()['X-WP-TotalPages'] );
    12041204
    1205         // Test paged
     1205        // Test paged.
    12061206        $request = new WP_REST_Request( 'GET', '/wp/v2/templates/' . self::TEST_THEME . '/' . self::TEMPLATE_NAME . '/revisions' );
    12071207        $request->set_param( 'page', 2 );
     
    12141214        $this->assertEquals( 2, $response->get_headers()['X-WP-TotalPages'] );
    12151215
    1216         // Test out of bounds
     1216        // Test out of bounds.
    12171217        $request = new WP_REST_Request( 'GET', '/wp/v2/templates/' . self::TEST_THEME . '/' . self::TEMPLATE_NAME . '/revisions' );
    12181218        $request->set_param( 'page', 4 );
  • trunk/tests/phpunit/tests/user/countUserPosts.php

    r59817 r59979  
    9292
    9393    /**
    94      * Post count be correct after reassigning posts to another user.
     94     * Post count should be correct after reassigning posts to another user.
    9595     *
    9696     * @ticket 39242
     
    117117
    118118    /**
    119      * Post count be correct after deleting user without reassigning posts.
     119     * Post count should be correct after deleting user without reassigning posts.
    120120     *
    121121     * @ticket 39242
     
    187187     */
    188188    public function test_cache_should_be_hit_regardless_of_post_type_order() {
    189         // Prime Cache.
     189        // Prime cache.
    190190        count_user_posts( self::$user_id, array( 'wptests_pt', 'post' ) );
    191191
     
    203203     */
    204204    public function test_cache_should_be_hit_for_string_and_array_equivalent_queries() {
    205         // Prime Cache.
     205        // Prime cache.
    206206        count_user_posts( self::$user_id, 'post' );
    207207
     
    219219    */
    220220    public function test_cache_should_be_hit_for_and_array_duplicates_equivalent_queries() {
    221         // Prime Cache
     221        // Prime cache.
    222222        count_user_posts( self::$user_id, array( 'post', 'post', 'post' ) );
    223223
Note: See TracChangeset for help on using the changeset viewer.