You are here

public function DefinitionTest::testLegacySetIsSynchronized in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/dependency-injection/Tests/DefinitionTest.php \Symfony\Component\DependencyInjection\Tests\DefinitionTest::testLegacySetIsSynchronized()

@covers Symfony\Component\DependencyInjection\Definition::setSynchronized @covers Symfony\Component\DependencyInjection\Definition::isSynchronized @group legacy

File

vendor/symfony/dependency-injection/Tests/DefinitionTest.php, line 171

Class

DefinitionTest

Namespace

Symfony\Component\DependencyInjection\Tests

Code

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