public function DefinitionTest::testSetIsSynthetic

@covers Symfony\Component\DependencyInjection\Definition::setSynthetic @covers Symfony\Component\DependencyInjection\Definition::isSynthetic

File

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

Class

DefinitionTest

Namespace

Symfony\Component\DependencyInjection\Tests

Code

public function testSetIsSynthetic() {
  $def = new Definition('stdClass');
  $this
    ->assertFalse($def
    ->isSynthetic(), '->isSynthetic() returns false by default');
  $this
    ->assertSame($def, $def
    ->setSynthetic(true), '->setSynthetic() implements a fluent interface');
  $this
    ->assertTrue($def
    ->isSynthetic(), '->isSynthetic() returns true if the service is synthetic.');
}