minor #26814 [EventDispatcher] Fix wrong listener in stopEventPropagation test (Peter Orosz)

This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #26814).

Discussion
----------

[EventDispatcher] Fix wrong listener in stopEventPropagation test

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #26810
| License       | MIT
| Doc PR        |

Commits
-------

24c460afa6 [EventDispatcher] Dispatcher in stopEventPropagation test now registers correct listener
This commit is contained in:
Christophe Coevoet 2018-04-05 16:23:50 +02:00
commit c415e4c22a

View File

@ -154,7 +154,7 @@ abstract class AbstractEventDispatcherTest extends TestCase
// 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->addListener('post.foo', array($otherListener, 'postFoo'));
$this->dispatcher->dispatch(self::postFoo);
$this->assertTrue($this->listener->postFooInvoked);
$this->assertFalse($otherListener->postFooInvoked);