Update to Drupal 8.1.0. For more information, see https://www.drupal.org/drupal-8.1.0-release-notes
This commit is contained in:
parent
b11a755ba8
commit
c0a0d5a94c
6920 changed files with 64395 additions and 57312 deletions
|
@ -59,6 +59,18 @@ class ContainerAwareEventDispatcherTest extends AbstractEventDispatcherTest
|
|||
->with($event)
|
||||
;
|
||||
|
||||
$service
|
||||
->expects($this->once())
|
||||
->method('onEventWithPriority')
|
||||
->with($event)
|
||||
;
|
||||
|
||||
$service
|
||||
->expects($this->once())
|
||||
->method('onEventNested')
|
||||
->with($event)
|
||||
;
|
||||
|
||||
$container = new Container();
|
||||
$container->set('service.subscriber', $service);
|
||||
|
||||
|
@ -66,6 +78,8 @@ class ContainerAwareEventDispatcherTest extends AbstractEventDispatcherTest
|
|||
$dispatcher->addSubscriberService('service.subscriber', 'Symfony\Component\EventDispatcher\Tests\SubscriberService');
|
||||
|
||||
$dispatcher->dispatch('onEvent', $event);
|
||||
$dispatcher->dispatch('onEventWithPriority', $event);
|
||||
$dispatcher->dispatch('onEventNested', $event);
|
||||
}
|
||||
|
||||
public function testPreventDuplicateListenerService()
|
||||
|
@ -92,6 +106,7 @@ class ContainerAwareEventDispatcherTest extends AbstractEventDispatcherTest
|
|||
|
||||
/**
|
||||
* @expectedException \InvalidArgumentException
|
||||
* @group legacy
|
||||
*/
|
||||
public function testTriggerAListenerServiceOutOfScope()
|
||||
{
|
||||
|
@ -111,6 +126,9 @@ class ContainerAwareEventDispatcherTest extends AbstractEventDispatcherTest
|
|||
$dispatcher->dispatch('onEvent');
|
||||
}
|
||||
|
||||
/**
|
||||
* @group legacy
|
||||
*/
|
||||
public function testReEnteringAScope()
|
||||
{
|
||||
$event = new Event();
|
||||
|
@ -239,11 +257,21 @@ class SubscriberService implements EventSubscriberInterface
|
|||
public static function getSubscribedEvents()
|
||||
{
|
||||
return array(
|
||||
'onEvent' => array('onEvent'),
|
||||
'onEvent' => 'onEvent',
|
||||
'onEventWithPriority' => array('onEventWithPriority', 10),
|
||||
'onEventNested' => array(array('onEventNested')),
|
||||
);
|
||||
}
|
||||
|
||||
public function onEvent(Event $e)
|
||||
{
|
||||
}
|
||||
|
||||
public function onEventWithPriority(Event $e)
|
||||
{
|
||||
}
|
||||
|
||||
public function onEventNested(Event $e)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue