class MockContainerInjection
Same name in other branches
- 8.9.x core/tests/Drupal/Tests/Core/Controller/ControllerResolverTest.php \Drupal\Tests\Core\Controller\MockContainerInjection
- 10 core/tests/Drupal/Tests/Core/Controller/ControllerResolverTest.php \Drupal\Tests\Core\Controller\MockContainerInjection
- 10 core/tests/Drupal/Tests/Core/Utility/CallableResolverTest.php \Drupal\Tests\Core\Utility\MockContainerInjection
- 11.x core/tests/Drupal/Tests/Core/Controller/ControllerResolverTest.php \Drupal\Tests\Core\Controller\MockContainerInjection
- 11.x core/tests/Drupal/Tests/Core/Utility/CallableResolverTest.php \Drupal\Tests\Core\Utility\MockContainerInjection
Hierarchy
- class \Drupal\Tests\Core\Controller\MockContainerInjection implements \Drupal\Core\DependencyInjection\ContainerInjectionInterface
Expanded class hierarchy of MockContainerInjection
File
-
core/
tests/ Drupal/ Tests/ Core/ Controller/ ControllerResolverTest.php, line 222
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
Title Sort descending | Modifiers | Object type | Summary | Overriden Title |
---|---|---|---|---|
MockContainerInjection::$result | protected | property | ||
MockContainerInjection::create | public static | function | Instantiates a new instance of this class. | Overrides ContainerInjectionInterface::create |
MockContainerInjection::getResult | public | function | ||
MockContainerInjection::__construct | public | function |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.