Skip to content

Commit

Permalink
Removed EventManager test that tested using a closure as it breaks co…
Browse files Browse the repository at this point in the history
…mpatability with php < 5.3.0

Refs #2105
  • Loading branch information
Andy Hobbs authored and markstory committed Nov 11, 2013
1 parent 615f700 commit 11db7c1
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions lib/Cake/Test/Case/Event/CakeEventManagerTest.php
Expand Up @@ -213,29 +213,6 @@ public function testDispatch() {
$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
*
Expand Down

0 comments on commit 11db7c1

Please sign in to comment.