public function RegisterListenersPassTest::testEventSubscriberResolvableClassName in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/symfony/event-dispatcher/Tests/DependencyInjection/RegisterListenersPassTest.php \Symfony\Component\EventDispatcher\Tests\DependencyInjection\RegisterListenersPassTest::testEventSubscriberResolvableClassName()
File
- vendor/
symfony/ event-dispatcher/ Tests/ DependencyInjection/ RegisterListenersPassTest.php, line 156
Class
Namespace
Symfony\Component\EventDispatcher\Tests\DependencyInjectionCode
public function testEventSubscriberResolvableClassName() {
$container = new ContainerBuilder();
$container
->setParameter('subscriber.class', 'Symfony\\Component\\EventDispatcher\\Tests\\DependencyInjection\\SubscriberService');
$container
->register('foo', '%subscriber.class%')
->addTag('kernel.event_subscriber', array());
$container
->register('event_dispatcher', 'stdClass');
$registerListenersPass = new RegisterListenersPass();
$registerListenersPass
->process($container);
$definition = $container
->getDefinition('event_dispatcher');
$expected_calls = array(
array(
'addSubscriberService',
array(
'foo',
'Symfony\\Component\\EventDispatcher\\Tests\\DependencyInjection\\SubscriberService',
),
),
);
$this
->assertSame($expected_calls, $definition
->getMethodCalls());
}