class MockInstantiationService
Same name in other branches
- 9 core/tests/Drupal/Tests/Component/DependencyInjection/ContainerTest.php \Drupal\Tests\Component\DependencyInjection\MockInstantiationService
- 8.9.x core/tests/Drupal/Tests/Component/DependencyInjection/ContainerTest.php \Drupal\Tests\Component\DependencyInjection\MockInstantiationService
- 11.x core/tests/Drupal/Tests/Component/DependencyInjection/ContainerTest.php \Drupal\Tests\Component\DependencyInjection\MockInstantiationService
Helper class to test Container::get() method for varying number of parameters.
@group DependencyInjection
Hierarchy
- class \Drupal\Tests\Component\DependencyInjection\MockInstantiationService
Expanded class hierarchy of MockInstantiationService
File
-
core/
tests/ Drupal/ Tests/ Component/ DependencyInjection/ ContainerTest.php, line 1136
Namespace
Drupal\Tests\Component\DependencyInjectionView source
class MockInstantiationService {
/**
* @var mixed[]
*/
protected $arguments;
/**
* Construct a mock instantiation service.
*/
public function __construct() {
$this->arguments = func_get_args();
}
/**
* Return arguments injected into the service.
*
* @return mixed[]
* Return the passed arguments.
*/
public function getArguments() {
return $this->arguments;
}
}
Members
Title Sort descending | Modifiers | Object type | Summary |
---|---|---|---|
MockInstantiationService::$arguments | protected | property | |
MockInstantiationService::getArguments | public | function | Return arguments injected into the service. |
MockInstantiationService::__construct | public | function | Construct a mock instantiation service. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.