Skip to content

Commit

Permalink
Reset the EventManager for on setUp
Browse files Browse the repository at this point in the history
  • Loading branch information
Berry Goudswaard committed Nov 26, 2014
1 parent 190b47c commit 9357723
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/TestSuite/IntegrationTestCase.php
Expand Up @@ -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;
Expand Down Expand Up @@ -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.
*
Expand Down

0 comments on commit 9357723

Please sign in to comment.