public function ContainerBuilderTest::testSetAlias in Drupal 9
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Core/DependencyInjection/ContainerBuilderTest.php \Drupal\Tests\Core\DependencyInjection\ContainerBuilderTest::testSetAlias()
@covers ::setAlias
File
- core/
tests/ Drupal/ Tests/ Core/ DependencyInjection/ ContainerBuilderTest.php, line 112
Class
- ContainerBuilderTest
- @coversDefaultClass \Drupal\Core\DependencyInjection\ContainerBuilder @group DependencyInjection
Namespace
Drupal\Tests\Core\DependencyInjectionCode
public function testSetAlias() {
$container = new ContainerBuilder();
$container
->register('bar');
$alias = $container
->setAlias('foo', 'bar');
$this
->assertTrue($alias
->isPublic());
}