public function MockService::setContainer in Service Container 7
Same name and namespace in other branches
- 7.2 tests/src/DependencyInjection/MockService.php \Drupal\Tests\service_container\DependencyInjection\MockService::setContainer()
Sets the container object.
Parameters
ContainerInterface $container: The container to inject via setter injection.
File
- tests/
src/ DependencyInjection/ MockService.php, line 62 - Contains \Drupal\Tests\service_container\DependencyInjection\MockService
Class
- MockService
- Helper class to test Container::get() method.
Namespace
Drupal\Tests\service_container\DependencyInjectionCode
public function setContainer(ContainerInterface $container) {
$this->container = $container;
}