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 app/code/community/EcomDev/PHPUnit/Test/Listener.php stores the fixture objects in the Magento registry. The fixture object is needed after the test run to clean up records that were created. But using the Magento registry is not a good idea as it might be (and should be) reset between test methods.
We'll be submitting a pull request for this with a suggested solution.
The text was updated successfully, but these errors were encountered:
The original code would only store the most recent version of the scop data when calling applyTestScope.
If you called the method twice then you lost the original scope.
Parts of the EcomDev_PHPUnit code are using the registry to store information.
Currently the test scope is only setup at the suite level but if tests in the suite expect a clean registry then there are problems.
This change converts to using a stack to store the scope.
Each time you call applyTestScope the current scope data is added to the stack.
Each time you call discardTestScope the previous scope data is restored.
If you call discardTestScope and there is no stored scope data, a RuntimeException is thrown.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Currently app/code/community/EcomDev/PHPUnit/Test/Listener.php stores the fixture objects in the Magento registry. The fixture object is needed after the test run to clean up records that were created. But using the Magento registry is not a good idea as it might be (and should be) reset between test methods.
We'll be submitting a pull request for this with a suggested solution.
The text was updated successfully, but these errors were encountered: