From 3b75e7d0f026f3790249ea6fc9c86c155b98091b Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 29 Sep 2020 14:14:28 +0000 Subject: [PATCH] Tests: Require `imagejpeg()` function in Ajax media editing tests. This outputs a proper message if the requirement is not met, instead of an obscure failure further in the test. These tests rely on multiple resized copies of a test JPEG image being generated and available. Follow-up to [49010], [49024], [49025], [49045], [49050], [49052]. See #50639, #50640. git-svn-id: https://develop.svn.wordpress.org/trunk@49069 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/ajax/MediaEdit.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/phpunit/tests/ajax/MediaEdit.php b/tests/phpunit/tests/ajax/MediaEdit.php index 61c262b013..0060083820 100644 --- a/tests/phpunit/tests/ajax/MediaEdit.php +++ b/tests/phpunit/tests/ajax/MediaEdit.php @@ -25,6 +25,7 @@ class Tests_Ajax_MediaEdit extends WP_Ajax_UnitTestCase { /** * @ticket 22985 + * @requires function imagejpeg */ public function testCropImageThumbnail() { require_once ABSPATH . 'wp-admin/includes/image-edit.php'; @@ -54,6 +55,7 @@ class Tests_Ajax_MediaEdit extends WP_Ajax_UnitTestCase { /** * @ticket 32171 + * @requires function imagejpeg */ public function testImageEditOverwriteConstant() { define( 'IMAGE_EDIT_OVERWRITE', true );