public function DefinitionTest::testSetGetFactory in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/dependency-injection/Tests/DefinitionTest.php \Symfony\Component\DependencyInjection\Tests\DefinitionTest::testSetGetFactory()
@covers Symfony\Component\DependencyInjection\Definition::setFactory @covers Symfony\Component\DependencyInjection\Definition::getFactory
File
- vendor/
symfony/ dependency-injection/ Tests/ DefinitionTest.php, line 34
Class
Namespace
Symfony\Component\DependencyInjection\TestsCode
public function testSetGetFactory() {
$def = new Definition('stdClass');
$this
->assertSame($def, $def
->setFactory('foo'), '->setFactory() implements a fluent interface');
$this
->assertEquals('foo', $def
->getFactory(), '->getFactory() returns the factory');
$def
->setFactory('Foo::bar');
$this
->assertEquals(array(
'Foo',
'bar',
), $def
->getFactory(), '->setFactory() converts string static method call to the array');
}