Changeset 35242 for trunk/tests/phpunit/tests/xmlrpc/wp/editPost.php
- Timestamp:
- 10/17/2015 06:02:16 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/xmlrpc/wp/editPost.php
r35225 r35242 127 127 // create attachment 128 128 $filename = ( DIR_TESTDATA.'/images/a2-small.jpg' ); 129 $attachment_id = self:: $factory->attachment->create_upload_object( $filename, $post_id );129 $attachment_id = self::factory()->attachment->create_upload_object( $filename, $post_id ); 130 130 131 131 // add post thumbnail to post that does not have one … … 149 149 150 150 // create another attachment 151 $attachment2_id = self:: $factory->attachment->create_upload_object( $filename, $post_id );151 $attachment2_id = self::factory()->attachment->create_upload_object( $filename, $post_id ); 152 152 153 153 // change the post's post_thumbnail … … 209 209 $editor_id = $this->make_user_by_role( 'editor' ); 210 210 211 $post_id = self:: $factory->post->create( array( 'post_author' => $editor_id ) );211 $post_id = self::factory()->post->create( array( 'post_author' => $editor_id ) ); 212 212 stick_post( $post_id ); 213 213 … … 221 221 // when transitioning to private status or adding a post password, post should be un-stuck 222 222 $editor_id = $this->make_user_by_role( 'editor' ); 223 $post_id = self:: $factory->post->create( array( 'post_author' => $editor_id ) );223 $post_id = self::factory()->post->create( array( 'post_author' => $editor_id ) ); 224 224 stick_post( $post_id ); 225 225 … … 235 235 $yesterday = strtotime( '-1 day' ); 236 236 237 $post_id = self:: $factory->post->create( array(237 $post_id = self::factory()->post->create( array( 238 238 'post_title' => 'Post Revision Test', 239 239 'post_content' => 'Not edited', … … 264 264 $editor_id = $this->make_user_by_role( 'editor' ); 265 265 266 $post_id = self:: $factory->post->create( array(266 $post_id = self::factory()->post->create( array( 267 267 'post_title' => 'Post Revision Test', 268 268 'post_content' => 'Not edited', … … 283 283 $editor_id = $this->make_user_by_role( 'editor' ); 284 284 285 $post_id = self:: $factory->post->create( array(285 $post_id = self::factory()->post->create( array( 286 286 'post_title' => 'Post Revision Test', 287 287 'post_content' => 'Not edited', … … 303 303 $editor_id = $this->make_user_by_role( 'editor' ); 304 304 305 $post_id = self:: $factory->post->create( array( 'post_author' => $editor_id ) );306 $term_id = self:: $factory->category->create();307 self:: $factory->term->add_post_terms( $post_id, $term_id, 'category', true );305 $post_id = self::factory()->post->create( array( 'post_author' => $editor_id ) ); 306 $term_id = self::factory()->category->create(); 307 self::factory()->term->add_post_terms( $post_id, $term_id, 'category', true ); 308 308 $term_ids = wp_list_pluck( get_the_category( $post_id ), 'term_id' ); 309 309 $this->assertContains( $term_id, $term_ids ); … … 323 323 $editor_id = $this->make_user_by_role( 'editor' ); 324 324 325 $post_id = self:: $factory->post->create( array( 'post_author' => $editor_id ) );326 $term_id = self:: $factory->category->create();327 self:: $factory->term->add_post_terms( $post_id, $term_id, 'category', true );325 $post_id = self::factory()->post->create( array( 'post_author' => $editor_id ) ); 326 $term_id = self::factory()->category->create(); 327 self::factory()->term->add_post_terms( $post_id, $term_id, 'category', true ); 328 328 $term_ids = wp_list_pluck( get_the_category( $post_id ), 'term_id' ); 329 329 $this->assertContains( $term_id, $term_ids ); … … 366 366 367 367 // Add a dummy post 368 $post_id = self:: $factory->post->create( array(368 $post_id = self::factory()->post->create( array( 369 369 'post_title' => 'Post Enclosure Test', 370 370 'post_content' => 'Fake content',
Note: See TracChangeset
for help on using the changeset viewer.