[wp-trac] [WordPress Trac] #36588: Test_Image_Resize_GD::test_resize_bad_image() doesn't use GD

WordPress Trac noreply at wordpress.org
Tue Apr 19 08:51:55 UTC 2016


#36588: Test_Image_Resize_GD::test_resize_bad_image() doesn't use GD
--------------------------+-------------------------
 Reporter:  ocean90       |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  4.6
Component:  Media         |    Version:
 Severity:  normal        |   Keywords:  needs-patch
  Focuses:                |
--------------------------+-------------------------
 The test method uses `WP_Tests_Image_Resize_UnitTestCase::resize_helper()`
 which is using `wp_get_image_editor()` internally. `wp_get_image_editor()`
 returns the first available image editor which can be Imagick too.


 In [30660] the test was changed to GD-only and moved to resize_gd.php in
 [31257].

 Example PHPUnit output when Imagick is broken, see #36587:

 {{{
 $ phpunit --group media

 1) Test_Image_Resize_GD::test_resize_bad_image
 ImagickException: imagecreatefromstring(): Data is not in a recognized
 format

 src/wp-includes/class-wp-image-editor-gd.php:110
 src/wp-includes/media.php:2851
 tests/phpunit/tests/image/resize.php:154
 tests/phpunit/tests/image/resize_gd.php:32
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/36588>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list