Restore global event managers that were causing cascading failures.

Refs #2105
This commit is contained in:
mark_story 2013-11-10 22:16:09 -05:00
parent 3e373771d7
commit 63d867c98b

View file

@ -395,6 +395,7 @@ class CakeEventManagerTest extends CakeTestCase {
$generalManager->expects($this->once())->method('prioritisedListeners')->with('fake.event'); $generalManager->expects($this->once())->method('prioritisedListeners')->with('fake.event');
$manager->dispatch($event); $manager->dispatch($event);
CakeEventManager::instance(new CakeEventManager());
} }
/** /**
@ -421,6 +422,7 @@ class CakeEventManagerTest extends CakeTestCase {
$expected = array('secondListenerFunction'); $expected = array('secondListenerFunction');
$this->assertEquals($expected, $listener->callStack); $this->assertEquals($expected, $listener->callStack);
CakeEventManager::instance(new CakeEventManager());
} }
/** /**
@ -451,6 +453,7 @@ class CakeEventManagerTest extends CakeTestCase {
$expected = array('listenerFunction', 'secondListenerFunction', 'thirdListenerFunction'); $expected = array('listenerFunction', 'secondListenerFunction', 'thirdListenerFunction');
$this->assertEquals($expected, $listener->callStack); $this->assertEquals($expected, $listener->callStack);
CakeEventManager::instance(new CakeEventManager());
} }
/** /**
@ -480,6 +483,7 @@ class CakeEventManagerTest extends CakeTestCase {
$expected = array('listenerFunction', 'secondListenerFunction'); $expected = array('listenerFunction', 'secondListenerFunction');
$this->assertEquals($expected, $listener->callStack); $this->assertEquals($expected, $listener->callStack);
CakeEventManager::instance(new CakeEventManager());
} }
} }