File
- drupal/core/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/Tests/EventDispatcherTest.php, line 133
Class
- EventDispatcherTest
Namespace
Symfony\Component\EventDispatcher\Tests
Code
public function testStopEventPropagation() {
$otherListener = new TestEventListener();
$this->dispatcher
->addListener('post.foo', array(
$this->listener,
'postFoo',
), 10);
$this->dispatcher
->addListener('post.foo', array(
$otherListener,
'preFoo',
));
$this->dispatcher
->dispatch(self::postFoo);
$this
->assertTrue($this->listener->postFooInvoked);
$this
->assertFalse($otherListener->postFooInvoked);
}