public function ContainerBuilderTest::testExtension in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/dependency-injection/Tests/ContainerBuilderTest.php \Symfony\Component\DependencyInjection\Tests\ContainerBuilderTest::testExtension()
@covers Symfony\Component\DependencyInjection\ContainerBuilder::registerExtension @covers Symfony\Component\DependencyInjection\ContainerBuilder::getExtension
File
- vendor/
symfony/ dependency-injection/ Tests/ ContainerBuilderTest.php, line 641
Class
Namespace
Symfony\Component\DependencyInjection\TestsCode
public function testExtension() {
$container = new ContainerBuilder();
$container
->setResourceTracking(false);
$container
->registerExtension($extension = new \ProjectExtension());
$this
->assertTrue($container
->getExtension('project') === $extension, '->registerExtension() registers an extension');
$this
->setExpectedException('LogicException');
$container
->getExtension('no_registered');
}