You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 27, 2023. It is now read-only.
Currently applyTestScope is only called once for the top level suite (and discardTestScope is only called at the end of the top level suite).
It would be much better if ever test would run in complete isolation starting with a fresh testScope (included registry,...) in order to make sure that there are not side effects from left-overs from previous tests.
Currently this can be done without code changes in EcomDev_PHPUnit by adding adding following to the individual test class (or a shared common parent class)
protected function setUp() {
EcomDev_PHPUnit_Model_App::applyTestScope();
// ... do custom stuff if required
parent::setUp();
}
protected function tearDown()
{
parent::tearDown();
// ... do custom stuff if required
EcomDev_PHPUnit_Model_App::discardTestScope();
}
Please note that this relies on #178 being in place
The text was updated successfully, but these errors were encountered:
Currently applyTestScope is only called once for the top level suite (and discardTestScope is only called at the end of the top level suite).
It would be much better if ever test would run in complete isolation starting with a fresh testScope (included registry,...) in order to make sure that there are not side effects from left-overs from previous tests.
Currently this can be done without code changes in EcomDev_PHPUnit by adding adding following to the individual test class (or a shared common parent class)
Please note that this relies on #178 being in place
The text was updated successfully, but these errors were encountered: