| Conditions | 2 |
| Paths | 2 |
| Total Lines | 19 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 22 | function it_registers_dictionaries( |
||
| 23 | ContainerBuilder $container, |
||
| 24 | Definition $dictionaries, |
||
| 25 | Definition $definition |
||
| 26 | ) { |
||
| 27 | $tags = ['foo' => [], 'bar' => [], 'baz' => []]; |
||
| 28 | |||
| 29 | $container->getDefinition(Collection::class)->willReturn($dictionaries); |
||
| 30 | $container->findTaggedServiceIds(DictionaryRegistrationPass::TAG_DICTIONARY)->willReturn($tags); |
||
| 31 | |||
| 32 | foreach (['foo', 'bar', 'baz'] as $id) { |
||
| 33 | $dictionaries |
||
| 34 | ->addMethodCall('add', Argument::exact([new Reference($id)])) |
||
| 35 | ->shouldBeCalledTimes(1) |
||
| 36 | ->willReturn($definition) |
||
| 37 | ; |
||
| 38 | } |
||
| 39 | |||
| 40 | $this->process($container); |
||
| 41 | } |
||
| 43 |
Adding explicit visibility (
private,protected, orpublic) is generally recommend to communicate to other developers how, and from where this method is intended to be used.