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
This commit is contained in:
Sergey Biryukov 2020-09-26 14:50:51 +00:00
parent e2b74bee82
commit 9aa0e0c92b

View File

@ -408,6 +408,7 @@ class Test_WP_Widget_Media_Image extends WP_UnitTestCase {
* Test render_media method. * Test render_media method.
* *
* @covers WP_Widget_Media_Image::render_media * @covers WP_Widget_Media_Image::render_media
* @requires function imagejpeg
*/ */
function test_render_media() { function test_render_media() {
$widget = new WP_Widget_Media_Image(); $widget = new WP_Widget_Media_Image();