diff --git a/tests/phpunit/tests/image/functions.php b/tests/phpunit/tests/image/functions.php index e149a324aa..9d7b4758c6 100644 --- a/tests/phpunit/tests/image/functions.php +++ b/tests/phpunit/tests/image/functions.php @@ -30,8 +30,6 @@ class Tests_Image_Functions extends WP_UnitTestCase { if ( extension_loaded( 'fileinfo' ) ) { $finfo = new finfo(); $mime_type = $finfo->file( $filename, FILEINFO_MIME ); - } elseif ( function_exists( 'mime_content_type' ) ) { - $mime_type = mime_content_type( $filename ); } if ( false !== strpos( $mime_type, ';' ) ) { list( $mime_type, $charset ) = explode( ';', $mime_type, 2 ); @@ -112,7 +110,7 @@ class Tests_Image_Functions extends WP_UnitTestCase { * @ticket 6821 */ public function test_wp_save_image_file() { - if ( ! extension_loaded( 'fileinfo' ) && ! function_exists( 'mime_content_type' ) ) { + if ( ! extension_loaded( 'fileinfo' ) ) { $this->markTestSkipped( 'The fileinfo PHP extension is not loaded.' ); } @@ -160,7 +158,7 @@ class Tests_Image_Functions extends WP_UnitTestCase { * @ticket 6821 */ public function test_mime_overrides_filename() { - if ( ! extension_loaded( 'fileinfo' ) && ! function_exists( 'mime_content_type' ) ) { + if ( ! extension_loaded( 'fileinfo' ) ) { $this->markTestSkipped( 'The fileinfo PHP extension is not loaded.' ); } @@ -198,7 +196,7 @@ class Tests_Image_Functions extends WP_UnitTestCase { * @ticket 6821 */ public function test_inferred_mime_types() { - if ( ! extension_loaded( 'fileinfo' ) && ! function_exists( 'mime_content_type' ) ) { + if ( ! extension_loaded( 'fileinfo' ) ) { $this->markTestSkipped( 'The fileinfo PHP extension is not loaded.' ); }