| Conditions | 2 |
| Paths | 2 |
| Total Lines | 21 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 20 | public function testAddConfigArgumentToServiceDefinitions(array $config) |
||
| 21 | { |
||
| 22 | $container = new ContainerBuilder(); |
||
| 23 | $container->setParameter('kernel.environment', 'test'); |
||
| 24 | |||
| 25 | $container->setParameter('palmtree_canonical_url.config', $config); |
||
| 26 | |||
| 27 | $definitions = [ |
||
| 28 | 'palmtree_canonical_url.url_generator' => new Definition(CanonicalUrlGenerator::class), |
||
| 29 | 'palmtree_canonical_url.exception_listener' => new Definition(ExceptionListener::class), |
||
| 30 | 'palmtree_canonical_url.request_listener' => new Definition(RequestListener::class), |
||
| 31 | ]; |
||
| 32 | |||
| 33 | $container->addDefinitions($definitions); |
||
| 34 | |||
| 35 | $compilerPass = new CompilerPass(); |
||
| 36 | |||
| 37 | $compilerPass->process($container); |
||
| 38 | |||
| 39 | foreach ($definitions as $id => $definition) { |
||
| 40 | $this->assertSame($config, $container->getDefinition($id)->getArgument(0)); |
||
| 41 | } |
||
| 44 |