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
This commit is contained in:
parent
bf945a81ec
commit
3b75e7d0f0
@ -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 );
|
||||
|
Loading…
Reference in New Issue
Block a user