[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
Tue Aug 11 18:36:37 UTC 2020
#50640: [PHPUnit] Mark test as skipped instead of failing if GD extension is not
availble
------------------------------+------------------------------
Reporter: ayeshrajans | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Build/Test Tools | Version:
Severity: normal | Resolution:
Keywords: has-patch php8 | Focuses:
------------------------------+------------------------------
Comment (by johnbillion):
I'm sorry but tests which are skipped when the environment doesn't meet
the requirements are inherently unreliable. This is why the skipping was
removed originally.
IMO there should be a hard requirement on GD, Imagick, and any other
extensions that are used within the tests, especially now we've got a
local development environment available that ships in the repo. It should
be able to provide the required extensions and always pass the
corresponding tests.
The `@requires` annotation in PHPUnit should be used for such tests, I'm
not sure why it's not used in core anywhere.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/50640#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list