public function DefinitionTest::testSetGetFactoryMethod

File

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

Class

DefinitionTest

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');
}