WordPress.org

Make WordPress Core


Ignore:
Timestamp:
01/29/2020 12:43:23 AM (2 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/admin/includesPost.php

    r46586 r47122  
    3030        wp_set_current_user( self::$contributor_id );
    3131
    32         // Create New Draft Post
     32        // Create new draft post.
    3333        $_post_data                = array();
    3434        $_post_data['post_author'] = self::$contributor_id;
     
    4141        $this->assertEquals( 'draft', $_results['post_status'] );
    4242
    43         // Submit Post for Approval
     43        // Submit post for approval.
    4444        $_post_data                = array();
    4545        $_post_data['post_author'] = self::$contributor_id;
     
    5252        $this->assertEquals( 'pending', $_results['post_status'] );
    5353
    54         // Create New Draft Post for another user
     54        // Create new draft post for another user.
    5555        $_post_data                = array();
    5656        $_post_data['post_author'] = self::$editor_id;
     
    6363        $this->assertEquals( 'Sorry, you are not allowed to create posts as this user.', $_results->get_error_message() );
    6464
    65         // Edit Draft Post for another user
     65        // Edit draft post for another user.
    6666        $_post_data                = array();
    6767        $_post_data['post_ID']     = self::factory()->post->create( array( 'post_author' => self::$editor_id ) );
     
    8080        wp_set_current_user( self::$editor_id );
    8181
    82         // Create New Draft Post
     82        // Create new draft post.
    8383        $_post_data                = array();
    8484        $_post_data['post_author'] = self::$editor_id;
     
    9191        $this->assertEquals( 'draft', $_results['post_status'] );
    9292
    93         // Publish Post
     93        // Publish post.
    9494        $_post_data                = array();
    9595        $_post_data['post_author'] = self::$editor_id;
     
    102102        $this->assertEquals( 'publish', $_results['post_status'] );
    103103
    104         // Create New Draft Post for another user
     104        // Create new draft post for another user.
    105105        $_post_data                = array();
    106106        $_post_data['post_author'] = self::$contributor_id;
     
    113113        $this->assertEquals( 'draft', $_results['post_status'] );
    114114
    115         // Edit Draft Post for another user
     115        // Edit draft post for another user.
    116116        $_post_data                = array();
    117117        $_post_data['post_ID']     = self::factory()->post->create( array( 'post_author' => self::$contributor_id ) );
     
    454454        wp_set_current_user( self::$admin_id );
    455455
    456         // Published posts should use published permalink
     456        // Published posts should use published permalink.
    457457        $p = self::factory()->post->create(
    458458            array(
     
    468468        $this->assertContains( '>new_slug-صورة<', $found, $message );
    469469
    470         // Scheduled posts should use published permalink
     470        // Scheduled posts should use published permalink.
    471471        $future_date = gmdate( 'Y-m-d H:i:s', time() + 100 );
    472472        $p           = self::factory()->post->create(
     
    484484        $this->assertContains( '>new_slug-صورة<', $found, $message );
    485485
    486         // Draft posts should use preview link
     486        // Draft posts should use preview link.
    487487        $p = self::factory()->post->create(
    488488            array(
Note: See TracChangeset for help on using the changeset viewer.