From 9aa0e0c92b71f5aba0ff091cc0878dde1c8045c5 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sat, 26 Sep 2020 14:50:51 +0000 Subject: [PATCH] Tests: Require `imagejpeg()` function in `WP_Widget_Media_Image::render_media()` test. This outputs a proper message if the requirement is not met, instead of an obscure failure further in the test. This test relies on multiple resized copies of a test JPEG image being generated and available. Follow-up to [49010], [49024], [49025], [49045], [49050]. See #50639, #50640. git-svn-id: https://develop.svn.wordpress.org/trunk@49052 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/widgets/media-image-widget.php | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/phpunit/tests/widgets/media-image-widget.php b/tests/phpunit/tests/widgets/media-image-widget.php index a89c8ad6b6..fc04e9adcc 100644 --- a/tests/phpunit/tests/widgets/media-image-widget.php +++ b/tests/phpunit/tests/widgets/media-image-widget.php @@ -408,6 +408,7 @@ class Test_WP_Widget_Media_Image extends WP_UnitTestCase { * Test render_media method. * * @covers WP_Widget_Media_Image::render_media + * @requires function imagejpeg */ function test_render_media() { $widget = new WP_Widget_Media_Image();