mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Wouldn't it be incredible if you could run Unit Tests without all of your uploads being indiscriminately blown away and your upload folder permissions being destroyed?
The Future Is Now. Fixes #28847. git-svn-id: https://develop.svn.wordpress.org/trunk@29120 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -88,7 +88,7 @@ class Tests_Image_Functions extends WP_UnitTestCase {
|
||||
// these are image files but aren't suitable for web pages because of compatibility or size issues
|
||||
$files = array(
|
||||
// 'test-image-cmyk.jpg', Allowed in r9727
|
||||
// 'test-image.bmp', Allowed in r28589
|
||||
// 'test-image.bmp', Allowed in r28589
|
||||
// 'test-image-grayscale.jpg', Allowed in r9727
|
||||
'test-image.pct',
|
||||
'test-image.tga',
|
||||
@@ -144,8 +144,8 @@ class Tests_Image_Functions extends WP_UnitTestCase {
|
||||
$this->assertEquals( $mime_type, $this->get_mime_type( $ret['path'] ) );
|
||||
|
||||
// Clean up
|
||||
@unlink( $file );
|
||||
@unlink( $ret['path'] );
|
||||
unlink( $file );
|
||||
unlink( $ret['path'] );
|
||||
}
|
||||
|
||||
// Clean up
|
||||
@@ -185,8 +185,8 @@ class Tests_Image_Functions extends WP_UnitTestCase {
|
||||
$this->assertEquals( $mime_type, $this->get_mime_type( $ret['path'] ) );
|
||||
|
||||
// Clean up
|
||||
@unlink( $file );
|
||||
@unlink( $ret['path'] );
|
||||
unlink( $file );
|
||||
unlink( $ret['path'] );
|
||||
unset( $img );
|
||||
}
|
||||
}
|
||||
@@ -231,8 +231,7 @@ class Tests_Image_Functions extends WP_UnitTestCase {
|
||||
$this->assertNotEmpty( $ret );
|
||||
$this->assertNotInstanceOf( 'WP_Error', $ret );
|
||||
$this->assertEquals( $mime_type, $this->get_mime_type( $ret['path'] ) );
|
||||
@unlink( $file );
|
||||
@unlink( $ret['path'] );
|
||||
unlink( $ret['path'] );
|
||||
}
|
||||
|
||||
// Clean up
|
||||
|
||||
Reference in New Issue
Block a user