public function testStopEventPropagation() {
$otherListener = new TestEventListener();
// postFoo() stops the propagation, so only one listener should
// be executed
// Manually set priority to enforce $this->listener to be called first
$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);
}