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 in576a55c
. Commits -------636401b
[EventDispatcher] fix tests
This commit is contained in:
commit
8950500057
@ -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();
|
||||
|
Reference in New Issue
Block a user