Skip to content

Commit 63d867c

Browse files
committed
Restore global event managers that were causing cascading failures.
Refs #2105
1 parent 3e37377 commit 63d867c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/Cake/Test/Case/Event/CakeEventManagerTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,7 @@ public function testDispatchWithGlobal() {
395395

396396
$generalManager->expects($this->once())->method('prioritisedListeners')->with('fake.event');
397397
$manager->dispatch($event);
398+
CakeEventManager::instance(new CakeEventManager());
398399
}
399400

400401
/**
@@ -421,6 +422,7 @@ public function testStopPropagation() {
421422

422423
$expected = array('secondListenerFunction');
423424
$this->assertEquals($expected, $listener->callStack);
425+
CakeEventManager::instance(new CakeEventManager());
424426
}
425427

426428
/**
@@ -451,6 +453,7 @@ public function testDispatchPrioritizedWithGlobal() {
451453

452454
$expected = array('listenerFunction', 'secondListenerFunction', 'thirdListenerFunction');
453455
$this->assertEquals($expected, $listener->callStack);
456+
CakeEventManager::instance(new CakeEventManager());
454457
}
455458

456459
/**
@@ -480,6 +483,7 @@ public function testDispatchGlobalBeforeLocal() {
480483

481484
$expected = array('listenerFunction', 'secondListenerFunction');
482485
$this->assertEquals($expected, $listener->callStack);
486+
CakeEventManager::instance(new CakeEventManager());
483487
}
484488

485489
}

0 commit comments

Comments
 (0)