Changeset 47338 for branches/3.8/tests/phpunit/tests/post/attachments.php
- Timestamp:
- 02/21/2020 01:05:39 PM (5 years ago)
- Location:
- branches/3.8
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.8
- Property svn:mergeinfo changed
-
branches/3.8/tests/phpunit/tests/post/attachments.php
r26004 r47338 10 10 function tearDown() { 11 11 // Remove all uploads. 12 $uploads = wp_upload_dir(); 13 foreach ( scandir( $uploads['basedir'] ) as $file ) 14 _rmdir( $uploads['basedir'] . '/' . $file ); 15 12 $this->remove_added_uploads(); 16 13 parent::tearDown(); 17 14 } … … 212 209 } 213 210 214 /**215 * GUID should never be empty216 * @ticket 18310217 * @ticket 21963218 */219 function test_insert_image_without_guid() {220 // this image is smaller than the thumbnail size so it won't have one221 $filename = ( DIR_TESTDATA.'/images/test-image.jpg' );222 $contents = file_get_contents($filename);223 224 $upload = wp_upload_bits(basename($filename), null, $contents);225 $this->assertTrue( empty($upload['error']) );226 227 $upload['url'] = '';228 $id = $this->_make_attachment( $upload );229 230 $guid = get_the_guid( $id );231 $this->assertFalse( empty( $guid ) );232 }233 234 211 }
Note: See TracChangeset
for help on using the changeset viewer.