class MockContainerInjection
Same name in this branch
- 11.x core/tests/Drupal/Tests/Core/Controller/ControllerResolverTest.php \Drupal\Tests\Core\Controller\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
- 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
Hierarchy
- class \Drupal\Tests\Core\Utility\MockContainerInjection implements \Drupal\Core\DependencyInjection\ContainerInjectionInterface
Expanded class hierarchy of MockContainerInjection
File
-
core/
tests/ Drupal/ Tests/ Core/ Utility/ CallableResolverTest.php, line 214
Namespace
Drupal\Tests\Core\UtilityView source
class MockContainerInjection implements ContainerInjectionInterface {
protected $injected;
public function __construct($result) {
$this->injected = $result;
}
public static function create(ContainerInterface $container) {
return new static('foo');
}
public function getResult($suffix) {
return __METHOD__ . '-' . $this->injected . '+' . $suffix;
}
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title |
---|---|---|---|---|
MockContainerInjection::$injected | protected | property | ||
MockContainerInjection::create | public static | function | 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.