$container =
new ContainerBuilder();
$container->
setParameter('lazy_foo_class', \Bar\FooClass::
class);
$container->
setParameter('container.dumper.inline_factories', true
);
$container->
setParameter('container.dumper.inline_class_loader', true
);
$container->
register('lazy_foo', \Bar\FooClass::
class) ->
addArgument(new Definition(\Bar\FooLazyClass::
class)) ->
setPublic(true
) ->
setLazy(true
);
$container->
getCompilerPassConfig()->
setOptimizationPasses([]);
$container->
compile();
$dumper =
new PhpDumper($container);
$dump =
print_r($dumper->
dump(['as_files' => true, 'file' => __DIR__, 'hot_path_tag' => 'hot', 'build_time' => 1563381341, 'inline_factories' => true, 'inline_class_loader' => true
]), true
);
if ('\\' === \DIRECTORY_SEPARATOR
) { $dump =
str_replace("'.\\DIRECTORY_SEPARATOR.'", '/',
$dump);
} $this->
assertStringMatchesFormatFile(self::
$fixturesPath.'/php/services9_lazy_inlined_factories.txt',
$dump);
}