You are here

public function MockService::setContainer in Service Container 7.2

Same name and namespace in other branches
  1. 7 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\DependencyInjection

Code

public function setContainer(ContainerInterface $container) {
  $this->container = $container;
}