class MockContainerInjection in Drupal 10
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Core/Controller/ControllerResolverTest.php \Drupal\Tests\Core\Controller\MockContainerInjection
- 9 core/tests/Drupal/Tests/Core/Controller/ControllerResolverTest.php \Drupal\Tests\Core\Controller\MockContainerInjection
Hierarchy
- class \Drupal\Tests\Core\Controller\MockContainerInjection implements ContainerInjectionInterface
Expanded class hierarchy of MockContainerInjection
File
- core/
tests/ Drupal/ Tests/ Core/ Controller/ ControllerResolverTest.php, line 219 - Contains \Drupal\Tests\Core\Controller\ControllerResolverTest.
Namespace
Drupal\Tests\Core\ControllerView source
class MockContainerInjection implements ContainerInjectionInterface {
protected $result;
public function __construct($result) {
$this->result = $result;
}
public static function create(ContainerInterface $container) {
return new static('This used injection.');
}
public function getResult() {
return $this->result;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
MockContainerInjection:: |
protected | property | ||
MockContainerInjection:: |
public static | function |
Instantiates a new instance of this class. Overrides ContainerInjectionInterface:: |
|
MockContainerInjection:: |
public | function | ||
MockContainerInjection:: |
public | function |