function ZfExtensionManagerSfContainerTest::testGetContainerException
Same name in this branch
- 9 core/modules/aggregator/tests/src/Unit/ZfExtensionManagerSfContainerTest.php \Drupal\Tests\aggregator\Unit\ZfExtensionManagerSfContainerTest::testGetContainerException()
Same name and namespace in other branches
- 8.9.x core/tests/Drupal/Tests/Component/Bridge/ZfExtensionManagerSfContainerTest.php \Drupal\Tests\Component\Bridge\ZfExtensionManagerSfContainerTest::testGetContainerException()
@covers ::get
File
-
core/
tests/ Drupal/ Tests/ Component/ Bridge/ ZfExtensionManagerSfContainerTest.php, line 71
Class
- ZfExtensionManagerSfContainerTest
- @coversDefaultClass <a href="/api/drupal/core%21lib%21Drupal%21Component%21Bridge%21ZfExtensionManagerSfContainer.php/class/ZfExtensionManagerSfContainer/9" title="Defines a bridge between the Laminas service manager to Symfony container." class="local">\Drupal\Component\Bridge\ZfExtensionManagerSfContainer</a> @group Bridge @group legacy
Namespace
Drupal\Tests\Component\BridgeCode
public function testGetContainerException() {
$this->expectException(ServiceNotFoundException::class);
$this->expectExceptionMessage('You have requested a non-existent service "test.foo".');
$container = new ContainerBuilder();
$bridge = new ZfExtensionManagerSfContainer('test.');
$bridge->setContainer($container);
$bridge->setStandalone(StandaloneExtensionManager::class);
$bridge->get('foo');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.