[wp-trac] [WordPress Trac] #50640: [PHPUnit] Mark test as skipped instead of failing if GD extension is not availble
WordPress Trac
noreply at wordpress.org
Fri Sep 25 14:41:31 UTC 2020
#50640: [PHPUnit] Mark test as skipped instead of failing if GD extension is not
availble
------------------------------+-----------------------------
Reporter: ayeshrajans | Owner: SergeyBiryukov
Type: enhancement | Status: accepted
Priority: normal | Milestone: 5.6
Component: Build/Test Tools | Version:
Severity: normal | Resolution:
Keywords: has-patch php8 | Focuses:
------------------------------+-----------------------------
Comment (by SergeyBiryukov):
Replying to [comment:21 mikeschroder]:
> Just in case it is helpful, this can be used to check if core supports
JPEG with any of the editors present:
> `wp_image_editor_supports( array( 'mime_type' => 'image/jpeg' ) )`
Thanks for sharing that! It is indeed helpful and could be used in some of
tests above that don't explicitly rely on GD functions, but rather on JPEG
support being present in general.
That said, since GD should already be a hard requirement for the test
suite per the discussion above, the end result would probably be the same
as with `@requires function imagejpeg`.
I don't have a strong preference here at the moment, but will consider
switching to `wp_image_editor_supports()` where appropriate, for clarity.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/50640#comment:22>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list