Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix failing tests in PHPUnit 3.7.0-RC2

  • Loading branch information...
commit d26040e3aa2173dfc3562ceb522287eb1083a5db 1 parent e8c1140
@markstory markstory authored
Showing with 9 additions and 7 deletions.
  1. +9 −7 lib/Cake/Test/Case/Event/CakeEventManagerTest.php
View
16 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());
}
Please sign in to comment.
Something went wrong with that request. Please try again.