You are here

public function LegacyDefinitionTest::testSetGetFactoryService in Service Container 7.2

Same name and namespace in other branches
  1. 7 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Tests/LegacyDefinitionTest.php \Symfony\Component\DependencyInjection\Tests\LegacyDefinitionTest::testSetGetFactoryService()

File

modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Tests/LegacyDefinitionTest.php, line 42

Class

LegacyDefinitionTest
@group legacy

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.");
}