Changeset 34855 for trunk/tests/phpunit/tests/xmlrpc/mw/newPost.php
- Timestamp:
- 10/06/2015 04:58:21 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/xmlrpc/mw/newPost.php
r34681 r34855 118 118 // create attachment 119 119 $filename = ( DIR_TESTDATA.'/images/a2-small.jpg' ); 120 $contents = file_get_contents( $filename ); 121 $upload = wp_upload_bits( $filename, null, $contents ); 122 $this->assertTrue( empty( $upload['error'] ) ); 123 124 $attachment = array( 125 'post_title' => 'Post Thumbnail', 126 'post_type' => 'attachment', 127 'post_mime_type' => 'image/jpeg', 128 'guid' => $upload['url'] 129 ); 130 $attachment_id = wp_insert_attachment( $attachment, $upload['file'] ); 120 $attachment_id = $this->factory->attachment->create_upload_object( $filename ); 131 121 132 122 $post = array( 'title' => 'Post Thumbnail Test', 'wp_post_thumbnail' => $attachment_id );
Note: See TracChangeset
for help on using the changeset viewer.