public function YamlFileLoaderTest::testLoadFactoryShortSyntax in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/symfony/dependency-injection/Tests/Loader/YamlFileLoaderTest.php \Symfony\Component\DependencyInjection\Tests\Loader\YamlFileLoaderTest::testLoadFactoryShortSyntax()
File
- vendor/
symfony/ dependency-injection/ Tests/ Loader/ YamlFileLoaderTest.php, line 178
Class
Namespace
Symfony\Component\DependencyInjection\Tests\LoaderCode
public function testLoadFactoryShortSyntax() {
$container = new ContainerBuilder();
$loader = new YamlFileLoader($container, new FileLocator(self::$fixturesPath . '/yaml'));
$loader
->load('services14.yml');
$services = $container
->getDefinitions();
$this
->assertEquals(array(
new Reference('baz'),
'getClass',
), $services['factory']
->getFactory(), '->load() parses the factory tag with service:method');
$this
->assertEquals(array(
'FooBacFactory',
'createFooBar',
), $services['factory_with_static_call']
->getFactory(), '->load() parses the factory tag with Class::method');
}