diff --git a/src/TestSuite/IntegrationTestCase.php b/src/TestSuite/IntegrationTestCase.php index 8cb25129c87..d50e39a8629 100644 --- a/src/TestSuite/IntegrationTestCase.php +++ b/src/TestSuite/IntegrationTestCase.php @@ -14,6 +14,7 @@ namespace Cake\TestSuite; use Cake\Core\Configure; +use Cake\Event\EventManager; use Cake\Network\Request; use Cake\Network\Session; use Cake\Routing\DispatcherFactory; @@ -89,6 +90,16 @@ abstract class IntegrationTestCase extends TestCase { */ protected $_requestSession; +/** + * Reset the EventManager for before each test. + * + * @return void + */ + public function setUp() { + parent::setUp(); + EventManager::instance(new EventManager()); + } + /** * Clear the state used for requests. *