public function DefinitionTest::testSetGetFactoryService

File

drupal/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Tests/DefinitionTest.php, line 46

Class

DefinitionTest

Namespace

Symfony\Component\DependencyInjection\Tests

Code

public function testSetGetFactoryService() {
  $def = new Definition('stdClass');
  $this
    ->assertNull($def
    ->getFactoryService());
  $this
    ->assertSame($def, $def
    ->setFactoryService('foo.bar'), "->setFactoryService() implements a fluent interface.");
  $this
    ->assertEquals('foo.bar', $def
    ->getFactoryService(), "->getFactoryService() returns current service to construct this service.");
}