diff --git tests/phpunit/tests/image/functions.php tests/phpunit/tests/image/functions.php
index e149a32..9d7b475 100644
|
|
class Tests_Image_Functions extends WP_UnitTestCase { |
30 | 30 | if ( extension_loaded( 'fileinfo' ) ) { |
31 | 31 | $finfo = new finfo(); |
32 | 32 | $mime_type = $finfo->file( $filename, FILEINFO_MIME ); |
33 | | } elseif ( function_exists( 'mime_content_type' ) ) { |
34 | | $mime_type = mime_content_type( $filename ); |
35 | 33 | } |
36 | 34 | if ( false !== strpos( $mime_type, ';' ) ) { |
37 | 35 | list( $mime_type, $charset ) = explode( ';', $mime_type, 2 ); |
… |
… |
class Tests_Image_Functions extends WP_UnitTestCase { |
112 | 110 | * @ticket 6821 |
113 | 111 | */ |
114 | 112 | public function test_wp_save_image_file() { |
115 | | if ( ! extension_loaded( 'fileinfo' ) && ! function_exists( 'mime_content_type' ) ) { |
| 113 | if ( ! extension_loaded( 'fileinfo' ) ) { |
116 | 114 | $this->markTestSkipped( 'The fileinfo PHP extension is not loaded.' ); |
117 | 115 | } |
118 | 116 | |
… |
… |
class Tests_Image_Functions extends WP_UnitTestCase { |
160 | 158 | * @ticket 6821 |
161 | 159 | */ |
162 | 160 | public function test_mime_overrides_filename() { |
163 | | if ( ! extension_loaded( 'fileinfo' ) && ! function_exists( 'mime_content_type' ) ) { |
| 161 | if ( ! extension_loaded( 'fileinfo' ) ) { |
164 | 162 | $this->markTestSkipped( 'The fileinfo PHP extension is not loaded.' ); |
165 | 163 | } |
166 | 164 | |
… |
… |
class Tests_Image_Functions extends WP_UnitTestCase { |
198 | 196 | * @ticket 6821 |
199 | 197 | */ |
200 | 198 | public function test_inferred_mime_types() { |
201 | | if ( ! extension_loaded( 'fileinfo' ) && ! function_exists( 'mime_content_type' ) ) { |
| 199 | if ( ! extension_loaded( 'fileinfo' ) ) { |
202 | 200 | $this->markTestSkipped( 'The fileinfo PHP extension is not loaded.' ); |
203 | 201 | } |
204 | 202 | |