Changeset 35225 for trunk/tests/phpunit/tests/post/revisions.php
- Timestamp:
- 10/16/2015 09:04:12 PM (11 years ago)
- File:
-
- 1 edited
-
trunk/tests/phpunit/tests/post/revisions.php (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/post/revisions.php
r35224 r35225 145 145 */ 146 146 function test_revision_view_caps_post() { 147 $post_id = $this->factory->post->create( array( 'post_type' => 'post', 'post_author' => self::$editor_user_id ) );147 $post_id = self::$factory->post->create( array( 'post_type' => 'post', 'post_author' => self::$editor_user_id ) ); 148 148 wp_update_post( array( 'post_content' => 'This content is much better', 'ID' => $post_id ) ); 149 149 … … 167 167 */ 168 168 function test_revision_restore_caps_post() { 169 $post_id = $this->factory->post->create( array( 'post_type' => 'post', 'post_author' => self::$editor_user_id ) );169 $post_id = self::$factory->post->create( array( 'post_type' => 'post', 'post_author' => self::$editor_user_id ) ); 170 170 wp_update_post( array( 'post_content' => 'This content is much better', 'ID' => $post_id ) ); 171 171 … … 187 187 */ 188 188 function test_revision_diff_caps_post() { 189 $post_id = $this->factory->post->create( array( 'post_type' => 'post', 'post_author' => self::$editor_user_id ) );189 $post_id = self::$factory->post->create( array( 'post_type' => 'post', 'post_author' => self::$editor_user_id ) ); 190 190 wp_update_post( array( 'post_content' => 'This content is much better', 'ID' => $post_id ) ); 191 191 wp_update_post( array( 'post_content' => 'This content is even better', 'ID' => $post_id ) ); … … 215 215 ) ); 216 216 217 $post_id = $this->factory->post->create( array( 'post_type' => $this->post_type, 'post_author' => self::$editor_user_id ) );217 $post_id = self::$factory->post->create( array( 'post_type' => $this->post_type, 'post_author' => self::$editor_user_id ) ); 218 218 wp_update_post( array( 'post_content' => 'This content is much better', 'ID' => $post_id ) ); 219 219 … … 248 248 249 249 //create a post as Editor 250 $post_id = $this->factory->post->create( array( 'post_type' => $this->post_type, 'post_author' => self::$editor_user_id ) );250 $post_id = self::$factory->post->create( array( 'post_type' => $this->post_type, 'post_author' => self::$editor_user_id ) ); 251 251 wp_update_post( array( 'post_content' => 'This content is much better', 'ID' => $post_id ) ); 252 252 … … 283 283 wp_set_current_user( self::$editor_user_id ); 284 284 285 $post_id = $this->factory->post->create( array( 'post_type' => $this->post_type, 'post_status' => 'draft' ) );285 $post_id = self::$factory->post->create( array( 'post_type' => $this->post_type, 'post_status' => 'draft' ) ); 286 286 wp_update_post( array( 'post_content' => 'This content is much better', 'ID' => $post_id ) ); 287 287 … … 315 315 ) ); 316 316 317 $post_id = $this->factory->post->create( array( 'post_type' => $this->post_type, 'post_author' => self::$editor_user_id ) );317 $post_id = self::$factory->post->create( array( 'post_type' => $this->post_type, 'post_author' => self::$editor_user_id ) ); 318 318 wp_update_post( array( 'post_content' => 'This content is much better', 'ID' => $post_id ) ); 319 319 wp_update_post( array( 'post_content' => 'This content is even better', 'ID' => $post_id ) ); … … 338 338 global $wpdb; 339 339 340 $post = $this->factory->post->create_and_get( array( 'post_title' => 'some-post', 'post_type' => 'post', 'post_content' => 'some_content' ) );340 $post = self::$factory->post->create_and_get( array( 'post_title' => 'some-post', 'post_type' => 'post', 'post_content' => 'some_content' ) ); 341 341 342 342 $post = (array) $post; … … 366 366 */ 367 367 function test_wp_get_post_revisions_should_order_by_ID_when_post_date_matches() { 368 $post = $this->factory->post->create_and_get( array( 'post_title' => 'some-post', 'post_type' => 'post', 'post_content' => 'some_content' ) );368 $post = self::$factory->post->create_and_get( array( 'post_title' => 'some-post', 'post_type' => 'post', 'post_content' => 'some_content' ) ); 369 369 370 370 $post = (array) $post;
Note: See TracChangeset
for help on using the changeset viewer.