Changeset 47338 for branches/3.8/tests/phpunit/tests/image/functions.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/image/functions.php
r26705 r47338 89 89 $files = array( 90 90 // 'test-image-cmyk.jpg', Allowed in r9727 91 'test-image.bmp',91 // 'test-image.bmp', Allowed in r28589 92 92 // 'test-image-grayscale.jpg', Allowed in r9727 93 93 'test-image.pct', … … 145 145 146 146 // Clean up 147 @unlink( $file );148 @unlink( $ret['path'] );147 unlink( $file ); 148 unlink( $ret['path'] ); 149 149 } 150 150 … … 186 186 187 187 // Clean up 188 @unlink( $file );189 @unlink( $ret['path'] );188 unlink( $file ); 189 unlink( $ret['path'] ); 190 190 unset( $img ); 191 191 } … … 232 232 $this->assertNotInstanceOf( 'WP_Error', $ret ); 233 233 $this->assertEquals( $mime_type, $this->get_mime_type( $ret['path'] ) ); 234 @unlink( $file ); 235 @unlink( $ret['path'] ); 234 unlink( $ret['path'] ); 236 235 } 237 236 … … 292 291 $this->markTestSkipped( 'jpeg support unavailable' ); 293 292 294 $file = wp_crop_image( 'http://asdftestblog1.files.wordpress.com/2008/04/canola.jpg', 293 if ( ! extension_loaded( 'openssl' ) ) { 294 $this->markTestSkipped( 'Tests_Image_Functions::test_wp_crop_image_url() requires openssl.' ); 295 } 296 297 $file = wp_crop_image( 'https://asdftestblog1.files.wordpress.com/2008/04/canola.jpg', 295 298 0, 0, 100, 100, 100, 100, false, 296 299 DIR_TESTDATA . '/images/' . rand_str() . '.jpg' ); … … 312 315 313 316 public function test_wp_crop_image_url_not_exist() { 314 $file = wp_crop_image( 'http://asdftestblog1.files.wordpress.com/2008/04/canoladoesnotexist.jpg', 317 if ( ! extension_loaded( 'openssl' ) ) { 318 $this->markTestSkipped( 'Tests_Image_Functions::test_wp_crop_image_url_not_exist() requires openssl.' ); 319 } 320 321 $file = wp_crop_image( 'https://asdftestblog1.files.wordpress.com/2008/04/canoladoesnotexist.jpg', 315 322 0, 0, 100, 100, 100, 100 ); 316 323 $this->assertInstanceOf( 'WP_Error', $file );
Note: See TracChangeset
for help on using the changeset viewer.