function MockService::__construct
Same name in other branches
- 9 core/tests/Drupal/Tests/Component/DependencyInjection/ContainerTest.php \Drupal\Tests\Component\DependencyInjection\MockService::__construct()
- 10 core/tests/Drupal/Tests/Component/DependencyInjection/ContainerTest.php \Drupal\Tests\Component\DependencyInjection\MockService::__construct()
- 11.x core/tests/Drupal/Tests/Component/DependencyInjection/ContainerTest.php \Drupal\Tests\Component\DependencyInjection\MockService::__construct()
Constructs a MockService object.
Parameters
object $some_other_service: (optional) Another injected service.
string $some_parameter: (optional) An injected parameter.
File
-
core/
tests/ Drupal/ Tests/ Component/ DependencyInjection/ ContainerTest.php, line 1100
Class
- MockService
- Helper class to test Container::get() method.
Namespace
Drupal\Tests\Component\DependencyInjectionCode
public function __construct($some_other_service = NULL, $some_parameter = NULL) {
if (is_array($some_other_service)) {
$some_other_service = $some_other_service[0];
}
$this->someOtherService = $some_other_service;
$this->someParameter = $some_parameter;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.