X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Ftests%2FDrupal%2FTests%2FComponent%2FEventDispatcher%2FContainerAwareEventDispatcherTest.php;fp=web%2Fcore%2Ftests%2FDrupal%2FTests%2FComponent%2FEventDispatcher%2FContainerAwareEventDispatcherTest.php;h=baafcd594bbb9bd3d43d2c2d8f6675ff0826f0bf;hp=ea0685a7171edb904a75d8e901751cbbfced812a;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hpb=680c79a86e3ed402f263faeac92e89fb6d9edcc0 diff --git a/web/core/tests/Drupal/Tests/Component/EventDispatcher/ContainerAwareEventDispatcherTest.php b/web/core/tests/Drupal/Tests/Component/EventDispatcher/ContainerAwareEventDispatcherTest.php index ea0685a71..baafcd594 100644 --- a/web/core/tests/Drupal/Tests/Component/EventDispatcher/ContainerAwareEventDispatcherTest.php +++ b/web/core/tests/Drupal/Tests/Component/EventDispatcher/ContainerAwareEventDispatcherTest.php @@ -38,7 +38,7 @@ class ContainerAwareEventDispatcherTest extends SymfonyContainerAwareEventDispat // When passing in callables exclusively as listeners into the event // dispatcher constructor, the event dispatcher must not attempt to // resolve any services. - $container = $this->getMock(ContainerInterface::class); + $container = $this->getMockBuilder(ContainerInterface::class)->getMock(); $container->expects($this->never())->method($this->anything()); $firstListener = new CallableClass(); @@ -73,7 +73,7 @@ class ContainerAwareEventDispatcherTest extends SymfonyContainerAwareEventDispat // When passing in callables exclusively as listeners into the event // dispatcher constructor, the event dispatcher must not attempt to // resolve any services. - $container = $this->getMock(ContainerInterface::class); + $container = $this->getMockBuilder(ContainerInterface::class)->getMock(); $container->expects($this->never())->method($this->anything()); $firstListener = new CallableClass(); @@ -193,4 +193,59 @@ class ContainerAwareEventDispatcherTest extends SymfonyContainerAwareEventDispat $this->assertSame(5, $actualPriority); } + /** + * @expectedDeprecation The Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher class is deprecated since Symfony 3.3 and will be removed in 4.0. Use EventDispatcher with closure factories instead. + * @group legacy + */ + public function testAddAListenerService() { + parent::testAddAListenerService(); + } + + /** + * @expectedDeprecation The Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher class is deprecated since Symfony 3.3 and will be removed in 4.0. Use EventDispatcher with closure factories instead. + * @group legacy + */ + public function testPreventDuplicateListenerService() { + parent::testPreventDuplicateListenerService(); + } + + /** + * @expectedDeprecation The Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher class is deprecated since Symfony 3.3 and will be removed in 4.0. Use EventDispatcher with closure factories instead. + * @group legacy + */ + public function testAddASubscriberService() { + parent::testAddASubscriberService(); + } + + /** + * @expectedDeprecation The Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher class is deprecated since Symfony 3.3 and will be removed in 4.0. Use EventDispatcher with closure factories instead. + * @group legacy + */ + public function testHasListenersOnLazyLoad() { + parent::testHasListenersOnLazyLoad(); + } + + /** + * @expectedDeprecation The Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher class is deprecated since Symfony 3.3 and will be removed in 4.0. Use EventDispatcher with closure factories instead. + * @group legacy + */ + public function testGetListenersOnLazyLoad() { + parent::testGetListenersOnLazyLoad(); + } + + /** + * @expectedDeprecation The Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher class is deprecated since Symfony 3.3 and will be removed in 4.0. Use EventDispatcher with closure factories instead. + * @group legacy + */ + public function testRemoveAfterDispatch() { + parent::testRemoveAfterDispatch(); + } + + /** + * @expectedDeprecation The Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher class is deprecated since Symfony 3.3 and will be removed in 4.0. Use EventDispatcher with closure factories instead. + * @group legacy + */ + public function testRemoveBeforeDispatch() { + parent::testRemoveBeforeDispatch(); + } }