[DI] fix failure

This commit is contained in:
Nicolas Grekas 2019-09-03 18:04:25 +02:00
parent 4ee3c6bd6a
commit 3b40cb19a2

View File

@ -306,8 +306,11 @@ class YamlFileLoaderTest extends TestCase
$taggedIterator = new TaggedIteratorArgument('foo', 'barfoo', 'foobar', true);
$this->assertEquals(new ServiceLocatorArgument($taggedIterator), $container->getDefinition('foo_service_tagged_locator')->getArgument(0));
$taggedIterator = new TaggedIteratorArgument('foo', null, null, true);
$this->assertEquals(new ServiceLocatorArgument($taggedIterator), $container->getDefinition('bar_service_tagged_locator')->getArgument(0));
if (is_subclass_of('Symfony\Component\Yaml\Exception\ExceptionInterface', 'Throwable')) {
// this test is not compatible with Yaml v3
$taggedIterator = new TaggedIteratorArgument('foo', null, null, true);
$this->assertEquals(new ServiceLocatorArgument($taggedIterator), $container->getDefinition('bar_service_tagged_locator')->getArgument(0));
}
}
public function testNameOnlyTagsAreAllowedAsString()