function ContainerBuilderTest::testSetParameterException
Same name and namespace in other branches
- 9 core/tests/Drupal/Tests/Core/DependencyInjection/ContainerBuilderTest.php \Drupal\Tests\Core\DependencyInjection\ContainerBuilderTest::testSetParameterException()
- 8.9.x core/tests/Drupal/Tests/Core/DependencyInjection/ContainerBuilderTest.php \Drupal\Tests\Core\DependencyInjection\ContainerBuilderTest::testSetParameterException()
- 10 core/tests/Drupal/Tests/Core/DependencyInjection/ContainerBuilderTest.php \Drupal\Tests\Core\DependencyInjection\ContainerBuilderTest::testSetParameterException()
@covers ::setParameter
File
-
core/
tests/ Drupal/ Tests/ Core/ DependencyInjection/ ContainerBuilderTest.php, line 32
Class
- ContainerBuilderTest
- @coversDefaultClass <a href="/api/drupal/core%21lib%21Drupal%21Core%21DependencyInjection%21ContainerBuilder.php/class/ContainerBuilder/11.x" title="Drupal's dependency injection container builder." class="local">\Drupal\Core\DependencyInjection\ContainerBuilder</a> @group DependencyInjection
Namespace
Drupal\Tests\Core\DependencyInjectionCode
public function testSetParameterException() : void {
$container = new ContainerBuilder();
$this->expectException(\InvalidArgumentException::class);
$this->expectExceptionMessage('Parameter names must be lowercase: Buzz');
$container->setParameter('Buzz', 'buzz');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.