Make WordPress Core


Ignore:
Timestamp:
01/29/2020 12:43:23 AM (4 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/wp/newPost.php

    r46586 r47122  
    151151        $this->make_user_by_role( 'author' );
    152152
    153         // create attachment
     153        // Create attachment.
    154154        $filename      = ( DIR_TESTDATA . '/images/a2-small.jpg' );
    155155        $attachment_id = self::factory()->attachment->create_upload_object( $filename );
     
    313313        $cat2_name = 'cat2';
    314314
    315         // first a post with valid categories; one that already exists and one to be created
     315        // First a post with valid categories; one that already exists and one to be created.
    316316        $post   = array(
    317317            'post_title'  => 'Test',
     
    322322        $result = $this->myxmlrpcserver->wp_newPost( array( 1, 'editor', 'editor', $post ) );
    323323        $this->assertNotIXRError( $result );
    324         // verify that cat2 was created
     324        // Verify that cat2 was created.
    325325        $cat2 = get_term_by( 'name', $cat2_name, 'category' );
    326326        $this->assertNotEmpty( $cat2 );
    327         // check that both categories were set on the post
     327        // Check that both categories were set on the post.
    328328        $post_cats = wp_get_object_terms( $result, 'category', array( 'fields' => 'ids' ) );
    329329        $this->assertContains( $cat1, $post_cats );
    330330        $this->assertContains( $cat2->term_id, $post_cats );
    331331
    332         // create a second post attempting to use the ambiguous name
     332        // Create a second post attempting to use the ambiguous name.
    333333        $post2   = array(
    334334            'post_title'  => 'Test',
Note: See TracChangeset for help on using the changeset viewer.