function ContainerBuilderTest::testRegister
Same name in other branches
- 9 core/tests/Drupal/Tests/Core/DependencyInjection/ContainerBuilderTest.php \Drupal\Tests\Core\DependencyInjection\ContainerBuilderTest::testRegister()
- 8.9.x core/tests/Drupal/Tests/Core/DependencyInjection/ContainerBuilderTest.php \Drupal\Tests\Core\DependencyInjection\ContainerBuilderTest::testRegister()
- 10 core/tests/Drupal/Tests/Core/DependencyInjection/ContainerBuilderTest.php \Drupal\Tests\Core\DependencyInjection\ContainerBuilderTest::testRegister()
@covers ::register
File
-
core/
tests/ Drupal/ Tests/ Core/ DependencyInjection/ ContainerBuilderTest.php, line 42
Class
- ContainerBuilderTest
- @coversDefaultClass \Drupal\Core\DependencyInjection\ContainerBuilder @group DependencyInjection
Namespace
Drupal\Tests\Core\DependencyInjectionCode
public function testRegister() : void {
$container = new ContainerBuilder();
$service = $container->register('bar');
$this->assertTrue($service->isPublic());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.