function ContainerTest::testGetForSyntheticServiceWithException
Tests that Container::get() for synthetic services throws an Exception if not defined.
@legacy-covers ::get @legacy-covers ::createService
File
-
core/
tests/ Drupal/ Tests/ Component/ DependencyInjection/ ContainerTest.php, line 410
Class
Namespace
Drupal\Tests\Component\DependencyInjectionCode
public function testGetForSyntheticServiceWithException() : void {
$this->expectException(RuntimeException::class);
$this->container
->get('synthetic');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.