public function ContainerBuilderTest::testNoExceptionWhenSetSyntheticServiceOnAFrozenContainer in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/symfony/dependency-injection/Tests/ContainerBuilderTest.php \Symfony\Component\DependencyInjection\Tests\ContainerBuilderTest::testNoExceptionWhenSetSyntheticServiceOnAFrozenContainer()
File
- vendor/symfony/ dependency-injection/ Tests/ ContainerBuilderTest.php, line 718 
Class
Namespace
Symfony\Component\DependencyInjection\TestsCode
public function testNoExceptionWhenSetSyntheticServiceOnAFrozenContainer() {
  $container = new ContainerBuilder();
  $def = new Definition('stdClass');
  $def
    ->setSynthetic(true);
  $container
    ->setDefinition('a', $def);
  $container
    ->compile();
  $container
    ->set('a', $a = new \stdClass());
  $this
    ->assertEquals($a, $container
    ->get('a'));
}