Tests: Require imagejpeg()
function in some more media tests.
This outputs a proper message if the requirement is not met, instead of an obscure PHP error 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]. See #50639, #50640. git-svn-id: https://develop.svn.wordpress.org/trunk@49045 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
3bfa4606c7
commit
5730b983b8
@ -1467,6 +1467,7 @@ EOF;
|
||||
|
||||
/**
|
||||
* @ticket 33641
|
||||
* @requires function imagejpeg
|
||||
*/
|
||||
function test_wp_calculate_image_srcset() {
|
||||
$_wp_additional_image_sizes = wp_get_additional_image_sizes();
|
||||
@ -1514,6 +1515,7 @@ EOF;
|
||||
|
||||
/**
|
||||
* @ticket 33641
|
||||
* @requires function imagejpeg
|
||||
*/
|
||||
function test_wp_calculate_image_srcset_no_date_uploads() {
|
||||
$_wp_additional_image_sizes = wp_get_additional_image_sizes();
|
||||
@ -1570,6 +1572,7 @@ EOF;
|
||||
|
||||
/**
|
||||
* @ticket 33641
|
||||
* @requires function imagejpeg
|
||||
*/
|
||||
function test_wp_calculate_image_srcset_with_edits() {
|
||||
// For this test we're going to mock metadata changes from an edit.
|
||||
@ -1603,6 +1606,7 @@ EOF;
|
||||
|
||||
/**
|
||||
* @ticket 35106
|
||||
* @requires function imagejpeg
|
||||
*/
|
||||
function test_wp_calculate_image_srcset_with_absolute_path_in_meta() {
|
||||
$_wp_additional_image_sizes = wp_get_additional_image_sizes();
|
||||
@ -1900,6 +1904,7 @@ EOF;
|
||||
|
||||
/**
|
||||
* @ticket 33641
|
||||
* @requires function imagejpeg
|
||||
*/
|
||||
function test_wp_get_attachment_image_srcset() {
|
||||
$_wp_additional_image_sizes = wp_get_additional_image_sizes();
|
||||
@ -1990,6 +1995,7 @@ EOF;
|
||||
|
||||
/**
|
||||
* @ticket 33641
|
||||
* @requires function imagejpeg
|
||||
*/
|
||||
function test_wp_calculate_image_sizes() {
|
||||
// Test sizes against the default WP sizes.
|
||||
@ -2013,6 +2019,7 @@ EOF;
|
||||
|
||||
/**
|
||||
* @ticket 33641
|
||||
* @requires function imagejpeg
|
||||
*/
|
||||
function test_wp_filter_content_tags_srcset_sizes() {
|
||||
$image_meta = wp_get_attachment_metadata( self::$large_id );
|
||||
@ -2174,6 +2181,7 @@ EOF;
|
||||
/**
|
||||
* @ticket 35045
|
||||
* @ticket 33641
|
||||
* @requires function imagejpeg
|
||||
*/
|
||||
function test_wp_filter_content_tags_schemes() {
|
||||
$image_meta = wp_get_attachment_metadata( self::$large_id );
|
||||
@ -2624,6 +2632,7 @@ EOF;
|
||||
|
||||
/**
|
||||
* @ticket 50367
|
||||
* @requires function imagejpeg
|
||||
*/
|
||||
function test_wp_filter_content_tags_width_height() {
|
||||
$image_meta = wp_get_attachment_metadata( self::$large_id );
|
||||
@ -2669,6 +2678,7 @@ EOF;
|
||||
/**
|
||||
* @ticket 44427
|
||||
* @ticket 50367
|
||||
* @requires function imagejpeg
|
||||
*/
|
||||
function test_wp_filter_content_tags_loading_lazy() {
|
||||
$image_meta = wp_get_attachment_metadata( self::$large_id );
|
||||
|
Loading…
Reference in New Issue
Block a user