EcomDev / EcomDev_PHPUnit

Magento PHPUnit Integration
http://www.ecomdev.org/shop/code-testing/php-unit-test-suite.html
Open Software License 3.0
299 stars 166 forks source link

Disable Events without Disabling Event Capture #241

Closed kojiromike closed 9 years ago

kojiromike commented 9 years ago

If I do Mage::app()->disableEvents(); then assertEventDispatched* does not detect any events. But if I don't disable events, then I have to manually account for the effects of every observer.

This pull request allows EcomDev to track events that would have been dispatched, without actually dispatching the events. It is compatible with the existing behavior because anyone who was using disableEvents/enableEvents before would not have been using assertEventDispatched before.

Signed-off-by: Michael A. Smith msmith3@ebay.com

IvanChepurnyi commented 9 years ago

Thanks, nice catch!