Permalink
Browse files

Revert "Fix failing tests in PHPUnit 3.7.0-RC2"

This reverts commit d26040e.
This change causes tests to fail in PHPUnit 3.6, this will have to wait
until 3.7.0 stable.
  • Loading branch information...
1 parent d26040e commit 4f637ed4c4dc1b4c1f280bc0c3f16d2530e88de4 @markstory markstory committed Sep 10, 2012
Showing with 7 additions and 9 deletions.
  1. +7 −9 lib/Cake/Test/Case/Event/CakeEventManagerTest.php
@@ -241,13 +241,11 @@ public function testDispatchReturnValue() {
$manager->attach(array($anotherListener, 'listenerFunction'), 'fake.event');
$event = new CakeEvent('fake.event');
- $listener->expects($this->at(0))
- ->method('listenerFunction')
- ->with($event)
+ $firstStep = clone $event;
+ $listener->expects($this->at(0))->method('listenerFunction')
+ ->with($firstStep)
->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);
}
@@ -265,11 +263,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($event)
+ ->with($originalEvent)
->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 4f637ed

Please sign in to comment.