mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Fix failing tests in PHPUnit 3.7.0-RC2
This commit is contained in:
parent
e8c1140fc8
commit
d26040e3aa
1 changed files with 9 additions and 7 deletions
|
@ -241,11 +241,13 @@ class CakeEventManagerTest extends CakeTestCase {
|
|||
$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 @@ 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($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());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue