Media: Skip `test_remove_orientation_data_on_rotate` if missing deps.

The `test_remove_orientation_data_on_rotate()` test was failing on systems that did not have the `exif` extension available.

Skips test when the `exif_read_data()` function does not exist.

Props danielbachhuber, desrosj.
Fixes #42447.

git-svn-id: https://develop.svn.wordpress.org/trunk@42431 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Mike Schroder 2018-01-10 01:16:56 +00:00
parent 5e524200b4
commit 07d244a054
1 changed files with 4 additions and 0 deletions

View File

@ -550,6 +550,10 @@ class Tests_Image_Editor_Imagick extends WP_Image_UnitTestCase {
* @ticket 37140
*/
public function test_remove_orientation_data_on_rotate() {
if ( ! function_exists( 'exif_read_data' ) ) {
$this->markTestSkipped( 'This test requires the exif_read_data function.' );
}
$file = DIR_TESTDATA . '/images/test-image-upside-down.jpg';
$data = wp_read_image_metadata( $file );