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