You are here

public function LegacyDefinitionTest::testSetGetFactoryClass in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/dependency-injection/Tests/LegacyDefinitionTest.php \Symfony\Component\DependencyInjection\Tests\LegacyDefinitionTest::testSetGetFactoryClass()

File

vendor/symfony/dependency-injection/Tests/LegacyDefinitionTest.php, line 21

Class

LegacyDefinitionTest
@group legacy

Namespace

Symfony\Component\DependencyInjection\Tests

Code

public function testSetGetFactoryClass() {
  $def = new Definition('stdClass');
  $this
    ->assertNull($def
    ->getFactoryClass());
  $this
    ->assertSame($def, $def
    ->setFactoryClass('stdClass2'), '->setFactoryClass() implements a fluent interface.');
  $this
    ->assertEquals('stdClass2', $def
    ->getFactoryClass(), '->getFactoryClass() returns current class to construct this service.');
}