function ContainerTest::testGetForCircularServices
Tests that Container::get() for circular dependencies works properly.
@legacy-covers ::get @legacy-covers ::createService
File
-
core/
tests/ Drupal/ Tests/ Component/ DependencyInjection/ ContainerTest.php, line 239
Class
Namespace
Drupal\Tests\Component\DependencyInjectionCode
public function testGetForCircularServices() : void {
$this->expectException(ServiceCircularReferenceException::class);
$this->container
->get('circular_dependency');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.