Permalink
Browse files

Fix failing tests in PHPUnit 3.7.0-RC2

  • Loading branch information...
markstory committed Sep 10, 2012
1 parent e8c1140 commit d26040e3aa2173dfc3562ceb522287eb1083a5db
Showing with 9 additions and 7 deletions.
  1. +9 −7 lib/Cake/Test/Case/Event/CakeEventManagerTest.php
@@ -241,11 +241,13 @@ public function testDispatchReturnValue() {
$manager->attach(array($anotherListener, 'listenerFunction'), 'fake.event');
$event = new CakeEvent('fake.event');
$firstStep = clone $event;
$listener->expects($this->at(0))->method('listenerFunction')
->with($firstStep)
$listener->expects($this->at(0))
->method('listenerFunction')
->with($event)
->will($this->returnValue('something special'));
$anotherListener->expects($this->at(0))->method('listenerFunction')->with($event);
$anotherListener->expects($this->at(0))
->method('listenerFunction')
->with($event);
$manager->dispatch($event);
$this->assertEquals('something special', $event->result);
}
@@ -263,11 +265,11 @@ public function testDispatchFalseStopsEvent() {
$manager->attach(array($anotherListener, 'listenerFunction'), 'fake.event');
$event = new CakeEvent('fake.event');
$originalEvent = clone $event;
$listener->expects($this->at(0))->method('listenerFunction')
->with($originalEvent)
->with($event)
->will($this->returnValue(false));
$anotherListener->expects($this->never())->method('listenerFunction');
$anotherListener->expects($this->never())
->method('listenerFunction');
$manager->dispatch($event);
$this->assertTrue($event->isStopped());
}

0 comments on commit d26040e

Please sign in to comment.