From 63748f2d678f3035e58f8d9409fe8e8f7619e4e3 Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Wed, 21 Oct 2015 22:10:43 +0000 Subject: [PATCH] Provide a more helpful failure message when Imagick isn't installed. Skipping the tests isn't really an option because Imagick's presence affects several other tests too. See #34087 git-svn-id: https://develop.svn.wordpress.org/trunk@35345 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/image/intermediate_size.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/phpunit/tests/image/intermediate_size.php b/tests/phpunit/tests/image/intermediate_size.php index 3cb8a50f80..ced46e009f 100644 --- a/tests/phpunit/tests/image/intermediate_size.php +++ b/tests/phpunit/tests/image/intermediate_size.php @@ -5,6 +5,14 @@ * @group upload */ class Tests_Image_Intermediate_Size extends WP_UnitTestCase { + + function setUp() { + parent::setUp(); + if ( ! extension_loaded( 'imagick' ) ) { + $this->fail( 'The Imagick extension is not installed.' ); + } + } + function tearDown() { $this->remove_added_uploads(); parent::tearDown();