Update to Drupal 8.2.0. For more information, see https://www.drupal.org/project/drupal/releases/8.2.0
This commit is contained in:
parent
2f563ab520
commit
f1c8716f57
1732 changed files with 52334 additions and 11780 deletions
|
@ -172,10 +172,24 @@ class ContainerAwareEventDispatcherTest extends SymfonyContainerAwareEventDispat
|
|||
$this->assertTrue($otherService->preFooInvoked);
|
||||
}
|
||||
|
||||
public function testGetListenerPriority()
|
||||
public function testGetListenerPriorityWithServices()
|
||||
{
|
||||
// Override the parent test as our implementation doesn't define
|
||||
// getListenerPriority().
|
||||
$container = new ContainerBuilder();
|
||||
$container->register('listener_service', TestEventListener::class);
|
||||
|
||||
$listeners = array(
|
||||
'test_event' => array(
|
||||
5 => array(
|
||||
array('service' => array('listener_service', 'preFoo')),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
$dispatcher = new ContainerAwareEventDispatcher($container, $listeners);
|
||||
$listenerService = $container->get('listener_service');
|
||||
$actualPriority = $dispatcher->getListenerPriority('test_event', [$listenerService, 'preFoo']);
|
||||
|
||||
$this->assertSame(5, $actualPriority);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Reference in a new issue