-
Type: Task
-
Resolution: Fixed
-
Priority: Minor - P4
-
Affects Version/s: None
-
Component/s: Tests
Various tearDown() methods in the test suite start with:
if ($this->hasFailed()) { return; }
They go on to clean up the test resources (e.g. drop collections) and then call the parent tearDown() method.
This presumes that the parent method intends to also do nothing if the test has failed, which may not always be the case (e.g. disabling fail points is always helpful).
Rather than return early, these functions should just gate their own logic and always delegate to the parent afterwards.