You are here

public function ContainerBuilderTest::testThrowsExceptionWhenSetDefinitionOnAFrozenContainer in Zircon Profile 8

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

@expectedException \BadMethodCallException

File

vendor/symfony/dependency-injection/Tests/ContainerBuilderTest.php, line 784

Class

ContainerBuilderTest

Namespace

Symfony\Component\DependencyInjection\Tests

Code

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