Changeset 47122 for trunk/tests/phpunit/tests/admin/includesPost.php
- Timestamp:
- 01/29/2020 12:43:23 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/admin/includesPost.php
r46586 r47122 30 30 wp_set_current_user( self::$contributor_id ); 31 31 32 // Create New Draft Post32 // Create new draft post. 33 33 $_post_data = array(); 34 34 $_post_data['post_author'] = self::$contributor_id; … … 41 41 $this->assertEquals( 'draft', $_results['post_status'] ); 42 42 43 // Submit Post for Approval43 // Submit post for approval. 44 44 $_post_data = array(); 45 45 $_post_data['post_author'] = self::$contributor_id; … … 52 52 $this->assertEquals( 'pending', $_results['post_status'] ); 53 53 54 // Create New Draft Post for another user54 // Create new draft post for another user. 55 55 $_post_data = array(); 56 56 $_post_data['post_author'] = self::$editor_id; … … 63 63 $this->assertEquals( 'Sorry, you are not allowed to create posts as this user.', $_results->get_error_message() ); 64 64 65 // Edit Draft Post for another user65 // Edit draft post for another user. 66 66 $_post_data = array(); 67 67 $_post_data['post_ID'] = self::factory()->post->create( array( 'post_author' => self::$editor_id ) ); … … 80 80 wp_set_current_user( self::$editor_id ); 81 81 82 // Create New Draft Post82 // Create new draft post. 83 83 $_post_data = array(); 84 84 $_post_data['post_author'] = self::$editor_id; … … 91 91 $this->assertEquals( 'draft', $_results['post_status'] ); 92 92 93 // Publish Post93 // Publish post. 94 94 $_post_data = array(); 95 95 $_post_data['post_author'] = self::$editor_id; … … 102 102 $this->assertEquals( 'publish', $_results['post_status'] ); 103 103 104 // Create New Draft Post for another user104 // Create new draft post for another user. 105 105 $_post_data = array(); 106 106 $_post_data['post_author'] = self::$contributor_id; … … 113 113 $this->assertEquals( 'draft', $_results['post_status'] ); 114 114 115 // Edit Draft Post for another user115 // Edit draft post for another user. 116 116 $_post_data = array(); 117 117 $_post_data['post_ID'] = self::factory()->post->create( array( 'post_author' => self::$contributor_id ) ); … … 454 454 wp_set_current_user( self::$admin_id ); 455 455 456 // Published posts should use published permalink 456 // Published posts should use published permalink. 457 457 $p = self::factory()->post->create( 458 458 array( … … 468 468 $this->assertContains( '>new_slug-صورة<', $found, $message ); 469 469 470 // Scheduled posts should use published permalink 470 // Scheduled posts should use published permalink. 471 471 $future_date = gmdate( 'Y-m-d H:i:s', time() + 100 ); 472 472 $p = self::factory()->post->create( … … 484 484 $this->assertContains( '>new_slug-صورة<', $found, $message ); 485 485 486 // Draft posts should use preview link 486 // Draft posts should use preview link. 487 487 $p = self::factory()->post->create( 488 488 array(
Note: See TracChangeset
for help on using the changeset viewer.