class MockContainerInjection
Same name in this branch
- 10 core/tests/Drupal/Tests/Core/Utility/CallableResolverTest.php \Drupal\Tests\Core\Utility\MockContainerInjection
Same name in other branches
- 9 core/tests/Drupal/Tests/Core/Controller/ControllerResolverTest.php \Drupal\Tests\Core\Controller\MockContainerInjection
- 8.9.x core/tests/Drupal/Tests/Core/Controller/ControllerResolverTest.php \Drupal\Tests\Core\Controller\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 219
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.