mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
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:
parent
d26040e3aa
commit
4f637ed4c4
1 changed files with 7 additions and 9 deletions
|
@ -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());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue