Make WordPress Core


Ignore:
Timestamp:
01/29/2020 12:43:23 AM (7 years ago)
Author:
SergeyBiryukov
Message:

Docs: Improve inline comments per the documentation standards.

Includes minor code layout fixes for better readability.

See #48303.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/link/getAdjacentPost.php

    r46586 r47122  
    1111         */
    1212        public function test_get_adjacent_post() {
    13                 // Need some sample posts to test adjacency
     13                // Need some sample posts to test adjacency.
    1414                $post_one = self::factory()->post->create_and_get(
    1515                        array(
    … …  
    4040                );
    4141
    42                 // Assign some terms
     42                // Assign some terms.
    4343                wp_set_object_terms( $post_one->ID, 'WordPress', 'category', false );
    4444                wp_set_object_terms( $post_three->ID, 'WordPress', 'category', false );
    … …  
    4747                wp_set_object_terms( $post_four->ID, 'plugins', 'post_tag', false );
    4848
    49                 // Test normal post adjacency
     49                // Test normal post adjacency.
    5050                $this->go_to( get_permalink( $post_two->ID ) );
    5151
    … …  
    5656                $this->assertNotEquals( $post_two, get_adjacent_post( false, '', false ) );
    5757
    58                 // Test category adjacency
     58                // Test category adjacency.
    5959                $this->go_to( get_permalink( $post_one->ID ) );
    6060
    … …  
    6262                $this->assertEquals( $post_three, get_adjacent_post( true, '', false, 'category' ) );
    6363
    64                 // Test tag adjacency
     64                // Test tag adjacency.
    6565                $this->go_to( get_permalink( $post_two->ID ) );
    6666
    … …  
    6868                $this->assertEquals( $post_four, get_adjacent_post( true, '', false, 'post_tag' ) );
    6969
    70                 // Test normal boundary post
     70                // Test normal boundary post.
    7171                $this->go_to( get_permalink( $post_two->ID ) );
    7272
    … …  
    7474                $this->assertEquals( array( $post_four ), get_boundary_post( false, '', false ) );
    7575
    76                 // Test category boundary post
     76                // Test category boundary post.
    7777                $this->go_to( get_permalink( $post_one->ID ) );
    7878
    … …  
    8080                $this->assertEquals( array( $post_three ), get_boundary_post( true, '', false, 'category' ) );
    8181
    82                 // Test tag boundary post
     82                // Test tag boundary post.
    8383                $this->go_to( get_permalink( $post_two->ID ) );
    8484
    … …  
    145145                );
    146146
    147                 // First post
     147                // First post.
    148148                $this->go_to( get_permalink( $one ) );
    149149                $this->assertEquals( $two, get_adjacent_post( false, array(), false ) );
    … …  
    153153                $this->assertEmpty( get_adjacent_post( false, array(), true ) );
    154154
    155                 // Fourth post
     155                // Fourth post.
    156156                $this->go_to( get_permalink( $four ) );
    157157                $this->assertEquals( $five, get_adjacent_post( false, array(), false ) );
    … …  
    165165                $this->assertEmpty( get_adjacent_post( true, array( $exclude ), true ) );
    166166
    167                 // Last post
     167                // Last post.
    168168                $this->go_to( get_permalink( $five ) );
    169169                $this->assertEquals( $four, get_adjacent_post( false, array(), true ) );
Note: See TracChangeset for help on using the changeset viewer.