We will be off from 27/1 (Monday) to 31/1 (Friday) (GMT +7) for our Tet Holiday (Lunar New Year) in our country

  • Lee Saferite's avatar
    Convert to using a stack for test scope storage (see issue #178) · b18329d7
    Lee Saferite authored
    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.
    b18329d7
App.php 15.9 KB