public function ContainerBuilderTest::testThrowsExceptionWhenSetServiceOnAFrozenContainer

@expectedException BadMethodCallException

File

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

Class

ContainerBuilderTest

Namespace

Symfony\Component\DependencyInjection\Tests

Code

public function testThrowsExceptionWhenSetServiceOnAFrozenContainer() {
  $container = new ContainerBuilder();
  $container
    ->setResourceTracking(false);
  $container
    ->setDefinition('a', new Definition('stdClass'));
  $container
    ->compile();
  $container
    ->set('a', new \stdClass());
}