$this->
assertFalse($locator->
isPublic());
$this->
assertSame(ServiceLocator::
class,
$locator->
getClass());
$expected =
[ 'string|'.TestDefinition2::
class.'|'.TestDefinition1::
class => new ServiceClosureArgument(new TypedReference('string|'.TestDefinition2::
class.'|'.TestDefinition1::
class, 'string|'.TestDefinition2::
class.'|'.TestDefinition1::
class)),
'bar' =>
new ServiceClosureArgument(new TypedReference(TestDefinition1::
class.'|'.TestDefinition2::
class, TestDefinition1::
class.'|'.TestDefinition2::
class, ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE, 'bar'
)),
'baz' =>
new ServiceClosureArgument(new TypedReference(TestDefinition1::
class.'|'.TestDefinition2::
class, TestDefinition1::
class.'|'.TestDefinition2::
class, ContainerInterface::IGNORE_ON_INVALID_REFERENCE, 'baz'
)),
];
$this->
assertEquals($expected,
$container->
getDefinition((string) $locator->
getFactory()[0
])->
getArgument(0
));
(new AutowirePass())->
process($container);
$expected =
[ 'string|'.TestDefinition2::
class.'|'.TestDefinition1::
class => new ServiceClosureArgument(new TypedReference('bar', TestDefinition1::
class.'|'.TestDefinition2::
class)),
'bar' =>
new ServiceClosureArgument(new TypedReference('bar', TestDefinition1::
class.'|'.TestDefinition2::
class, ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE, 'bar'
)),
'baz' =>
new ServiceClosureArgument(new TypedReference('bar', TestDefinition1::
class.'|'.TestDefinition2::
class, ContainerInterface::IGNORE_ON_INVALID_REFERENCE, 'baz'
)),
];
$this->
assertEquals($expected,
$container->
getDefinition((string) $locator->
getFactory()[0
])->
getArgument(0
));
} public function testIntersectionServices() {