public function ContainerTest::testSetParameterWithUnfrozenContainer in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/tests/Drupal/Tests/Component/DependencyInjection/ContainerTest.php \Drupal\Tests\Component\DependencyInjection\ContainerTest::testSetParameterWithUnfrozenContainer()
Tests that Container::setParameter() in an unfrozen case works properly.
@covers ::setParameter
File
- core/
tests/ Drupal/ Tests/ Component/ DependencyInjection/ ContainerTest.php, line 122 - Contains \Drupal\Tests\Component\DependencyInjection\ContainerTest.
Class
- ContainerTest
- @coversDefaultClass \Drupal\Component\DependencyInjection\Container @group DependencyInjection
Namespace
Drupal\Tests\Component\DependencyInjectionCode
public function testSetParameterWithUnfrozenContainer() {
$container_definition = $this->containerDefinition;
$container_definition['frozen'] = FALSE;
$this->container = new $this->containerClass($container_definition);
$this->container
->setParameter('some_config', 'new_value');
$this
->assertEquals('new_value', $this->container
->getParameter('some_config'), 'Container parameters can be set.');
}