[wp-trac] [WordPress Trac] #41148: Test for ticket 39875 can throw PHP error
WordPress Trac
noreply at wordpress.org
Sat Jun 24 09:38:23 UTC 2017
#41148: Test for ticket 39875 can throw PHP error
--------------------------+------------------------------
Reporter: schlessera | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Media | Version: 4.8
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
--------------------------+------------------------------
Comment (by schlessera):
I agree that tests should be as lean as possible. But if you put these
checks into a different test, you will still have this particular test
throw a PHP error instead of failing. I think that tests should never
throw errors, they should always only succeed or fail (or be skipped).
The problem with having the test be too complex in this case is an issue
with the testability of the code, and not with the test itself.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/41148#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list