You are here

public function LegacyDefinitionTest::testSetGetFactoryMethod 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::testSetGetFactoryMethod()

File

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

Class

LegacyDefinitionTest
@group legacy

Namespace

Symfony\Component\DependencyInjection\Tests

Code

public function testSetGetFactoryMethod() {
  $def = new Definition('stdClass');
  $this
    ->assertNull($def
    ->getFactoryMethod());
  $this
    ->assertSame($def, $def
    ->setFactoryMethod('foo'), '->setFactoryMethod() implements a fluent interface');
  $this
    ->assertEquals('foo', $def
    ->getFactoryMethod(), '->getFactoryMethod() returns the factory method name');
}