minor #18711 [EventDispatcher] fix tests (xabbuh)

This PR was merged into the 3.0 branch.

Discussion
----------

[EventDispatcher] fix tests

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

The `getListenerPriority()` method was added to the event dispatcher
interface in Symfony 3.0. Thus, it no longer makes sense to have a test
that expects the method not to exist (the corresponding code in the
`TraceableEventDispatcher` was already removed in 576a55c.

Commits
-------

636401b [EventDispatcher] fix tests
This commit is contained in:
Fabien Potencier 2016-05-05 10:15:23 +02:00
commit 8950500057

View File

@ -73,16 +73,6 @@ class TraceableEventDispatcherTest extends \PHPUnit_Framework_TestCase
$this->assertSame(123, $tdispatcher->getListenerPriority('foo', $listeners[0]));
}
public function testGetListenerPriorityReturnsZeroWhenWrappedMethodDoesNotExist()
{
$dispatcher = $this->getMock('Symfony\Component\EventDispatcher\EventDispatcherInterface');
$traceableEventDispatcher = new TraceableEventDispatcher($dispatcher, new Stopwatch());
$traceableEventDispatcher->addListener('foo', function () {}, 123);
$listeners = $traceableEventDispatcher->getListeners('foo');
$this->assertSame(0, $traceableEventDispatcher->getListenerPriority('foo', $listeners[0]));
}
public function testAddRemoveSubscriber()
{
$dispatcher = new EventDispatcher();