public function DefinitionTest::testLegacySetIsSynchronized in Service Container 7
Same name and namespace in other branches
- 7.2 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Tests/DefinitionTest.php \Symfony\Component\DependencyInjection\Tests\DefinitionTest::testLegacySetIsSynchronized()
@covers Symfony\Component\DependencyInjection\Definition::setSynchronized @covers Symfony\Component\DependencyInjection\Definition::isSynchronized @group legacy
File
- modules/
providers/ service_container_symfony/ lib/ Symfony/ Component/ DependencyInjection/ Tests/ DefinitionTest.php, line 171
Class
Namespace
Symfony\Component\DependencyInjection\TestsCode
public function testLegacySetIsSynchronized() {
$this
->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
$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.');
}