Make WordPress Core


Ignore:
Timestamp:
01/29/2020 12:43:23 AM (5 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/xmlrpc/mw/editPost.php

    r46586 r47122  
    146146        $this->assertEquals( '', get_post_meta( $post_id, '_thumbnail_id', true ) );
    147147
    148         // create attachment
     148        // Create attachment.
    149149        $filename      = ( DIR_TESTDATA . '/images/a2-small.jpg' );
    150150        $attachment_id = self::factory()->attachment->create_upload_object( $filename, $post_id );
    151151
    152         // add post thumbnail to post that does not have one
     152        // Add post thumbnail to post that does not have one.
    153153        $post2  = array( 'wp_post_thumbnail' => $attachment_id );
    154154        $result = $this->myxmlrpcserver->mw_editPost( array( $post_id, 'author', 'author', $post2 ) );
     
    156156        $this->assertEquals( $attachment_id, get_post_meta( $post_id, '_thumbnail_id', true ) );
    157157
    158         // edit the post without supplying a post_thumbnail and check that it didn't change
     158        // Edit the post without supplying a post_thumbnail and check that it didn't change.
    159159        $post3  = array( 'post_content' => 'Updated post' );
    160160        $result = $this->myxmlrpcserver->mw_editPost( array( $post_id, 'author', 'author', $post3 ) );
     
    162162        $this->assertEquals( $attachment_id, get_post_meta( $post_id, '_thumbnail_id', true ) );
    163163
    164         // create another attachment
     164        // Create another attachment.
    165165        $attachment2_id = self::factory()->attachment->create_upload_object( $filename, $post_id );
    166166
    167         // change the post's post_thumbnail
     167        // Change the post's post_thumbnail.
    168168        $post4  = array( 'wp_post_thumbnail' => $attachment2_id );
    169169        $result = $this->myxmlrpcserver->mw_editPost( array( $post_id, 'author', 'author', $post4 ) );
     
    171171        $this->assertEquals( $attachment2_id, get_post_meta( $post_id, '_thumbnail_id', true ) );
    172172
    173         // unset the post's post_thumbnail
     173        // Unset the post's post_thumbnail.
    174174        $post5  = array( 'wp_post_thumbnail' => '' );
    175175        $result = $this->myxmlrpcserver->mw_editPost( array( $post_id, 'author', 'author', $post5 ) );
     
    247247    }
    248248
    249     // Not allowed since [19914]
     249    // Not allowed since [19914].
    250250    function test_change_post_type() {
    251251        $contributor_id = $this->make_user_by_role( 'contributor' );
Note: See TracChangeset for help on using the changeset viewer.