public function ContainerBuilderTest::testSetParameterException in Drupal 10
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Core/DependencyInjection/ContainerBuilderTest.php \Drupal\Tests\Core\DependencyInjection\ContainerBuilderTest::testSetParameterException()
- 9 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 51
Class
- ContainerBuilderTest
- @coversDefaultClass \Drupal\Core\DependencyInjection\ContainerBuilder @group DependencyInjection
Namespace
Drupal\Tests\Core\DependencyInjectionCode
public function testSetParameterException() {
$container = new ContainerBuilder();
$this
->expectException(\InvalidArgumentException::class);
$this
->expectExceptionMessage('Parameter names must be lowercase: Buzz');
$container
->setParameter('Buzz', 'buzz');
}