public function MockService::__construct in Zircon Profile 8
Same name and namespace in other branches
- 8.0 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 1102 - Contains \Drupal\Tests\Component\DependencyInjection\ContainerTest.
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;
}