Revert "Fix failing tests in PHPUnit 3.7.0-RC2"

This reverts commit d26040e3aa.
This change causes tests to fail in PHPUnit 3.6, this will have to wait
until 3.7.0 stable.
This commit is contained in:
mark_story 2012-09-09 21:36:33 -04:00
parent d26040e3aa
commit 4f637ed4c4

View file

@ -241,13 +241,11 @@ class CakeEventManagerTest extends CakeTestCase {
$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 @@ class CakeEventManagerTest extends CakeTestCase {
$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());
}