You are here

public function ContainerTest::testIsFrozen in Service Container 7.2

Same name and namespace in other branches
  1. 7 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Tests/ContainerTest.php \Symfony\Component\DependencyInjection\Tests\ContainerTest::testIsFrozen()

@covers Symfony\Component\DependencyInjection\Container::isFrozen

File

modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Tests/ContainerTest.php, line 94

Class

ContainerTest

Namespace

Symfony\Component\DependencyInjection\Tests

Code

public function testIsFrozen() {
  $sc = new Container(new ParameterBag(array(
    'foo' => 'bar',
  )));
  $this
    ->assertFalse($sc
    ->isFrozen(), '->isFrozen() returns false if the parameters are not frozen');
  $sc
    ->compile();
  $this
    ->assertTrue($sc
    ->isFrozen(), '->isFrozen() returns true if the parameters are frozen');
}