Tests: Correctly unset non-supported image editor engines in some image tests.
Follow-up to [49009], [49014]. See #50639, #50640. git-svn-id: https://develop.svn.wordpress.org/trunk@49018 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
ab25da99a0
commit
8856579610
@ -157,10 +157,10 @@ class Tests_Image_Functions extends WP_UnitTestCase {
|
||||
|
||||
$classes = array( 'WP_Image_Editor_GD', 'WP_Image_Editor_Imagick' );
|
||||
|
||||
foreach ( $classes as $class ) {
|
||||
foreach ( $classes as $key => $class ) {
|
||||
if ( ! call_user_func( array( $class, 'test' ) ) ) {
|
||||
// If the image editor isn't available, skip it.
|
||||
unset( $classes[ $class ] );
|
||||
unset( $classes[ $key ] );
|
||||
}
|
||||
}
|
||||
|
||||
@ -216,10 +216,10 @@ class Tests_Image_Functions extends WP_UnitTestCase {
|
||||
|
||||
$classes = array( 'WP_Image_Editor_GD', 'WP_Image_Editor_Imagick' );
|
||||
|
||||
foreach ( $classes as $class ) {
|
||||
foreach ( $classes as $key => $class ) {
|
||||
if ( ! call_user_func( array( $class, 'test' ) ) ) {
|
||||
// If the image editor isn't available, skip it.
|
||||
unset( $classes[ $class ] );
|
||||
unset( $classes[ $key ] );
|
||||
}
|
||||
}
|
||||
|
||||
@ -261,10 +261,10 @@ class Tests_Image_Functions extends WP_UnitTestCase {
|
||||
|
||||
$classes = array( 'WP_Image_Editor_GD', 'WP_Image_Editor_Imagick' );
|
||||
|
||||
foreach ( $classes as $class ) {
|
||||
foreach ( $classes as $key => $class ) {
|
||||
if ( ! call_user_func( array( $class, 'test' ) ) ) {
|
||||
// If the image editor isn't available, skip it.
|
||||
unset( $classes[ $class ] );
|
||||
unset( $classes[ $key ] );
|
||||
}
|
||||
}
|
||||
|
||||
@ -327,10 +327,10 @@ class Tests_Image_Functions extends WP_UnitTestCase {
|
||||
|
||||
$classes = array( 'WP_Image_Editor_GD', 'WP_Image_Editor_Imagick' );
|
||||
|
||||
foreach ( $classes as $class ) {
|
||||
foreach ( $classes as $key => $class ) {
|
||||
if ( ! call_user_func( array( $class, 'test' ) ) ) {
|
||||
// If the image editor isn't available, skip it.
|
||||
unset( $classes[ $class ] );
|
||||
unset( $classes[ $key ] );
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user