use Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher;
use Symfony\Component\DependencyInjection\Container;
use Symfony\Component\DependencyInjection\ContainerBuilder;
+use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\EventDispatcher\Tests\CallableClass;
-use Symfony\Component\EventDispatcher\Tests\TestEventListener;
use Symfony\Component\EventDispatcher\Tests\ContainerAwareEventDispatcherTest as SymfonyContainerAwareEventDispatcherTest;
+use Symfony\Component\EventDispatcher\Tests\TestEventListener;
/**
* Unit tests for the ContainerAwareEventDispatcher.
// 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('Symfony\Component\DependencyInjection\IntrospectableContainerInterface');
+ $container = $this->getMockBuilder(ContainerInterface::class)->getMock();
$container->expects($this->never())->method($this->anything());
$firstListener = new CallableClass();
// 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('Symfony\Component\DependencyInjection\IntrospectableContainerInterface');
+ $container = $this->getMockBuilder(ContainerInterface::class)->getMock();
$container->expects($this->never())->method($this->anything());
$firstListener = new CallableClass();
$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();
+ }
}