From 07d244a054d01abd377848f93c44c44b8723e6f9 Mon Sep 17 00:00:00 2001 From: Mike Schroder Date: Wed, 10 Jan 2018 01:16:56 +0000 Subject: [PATCH] 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 --- tests/phpunit/tests/image/editorImagick.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/phpunit/tests/image/editorImagick.php b/tests/phpunit/tests/image/editorImagick.php index ec75106239..fb88f3346d 100644 --- a/tests/phpunit/tests/image/editorImagick.php +++ b/tests/phpunit/tests/image/editorImagick.php @@ -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 );