mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Removed EventManager test that tested using a closure as it breaks compatability with php < 5.3.0
Refs #2105
This commit is contained in:
parent
615f700d22
commit
11db7c1631
1 changed files with 0 additions and 23 deletions
|
@ -213,29 +213,6 @@ class CakeEventManagerTest extends CakeTestCase {
|
|||
$manager->dispatch($event);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests event dispatching
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testDispatchClosure() {
|
||||
$this->skipIf(
|
||||
version_compare(PHP_VERSION, '5.3.0', '<'),
|
||||
'These tests fail in PHP version < 5.3'
|
||||
);
|
||||
|
||||
$manager = new CakeEventManager;
|
||||
$listener = $this->getMock('CakeEventTestListener');
|
||||
$anotherListener = $this->getMock('CakeEventTestListener');
|
||||
|
||||
$manager->attach(function($testEvent) use ($listener) { $listener->listenerFunction($testEvent); }, 'fake.event');
|
||||
|
||||
$event = new CakeEvent('fake.event');
|
||||
|
||||
$listener->expects($this->once())->method('listenerFunction')->with($event);
|
||||
$manager->dispatch($event);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests event dispatching using event key name
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue