protected function UnitTestBase::registerServiceWithContainerMock in Entity Construction Kit (ECK) 8
Registers a (mocked) service with the mocked service container.
Parameters
string $service_id: The service id.
mixed $service: The service to be returned when the service_id is requested from the container.
2 calls to UnitTestBase::registerServiceWithContainerMock()
- EckEntityTest::testBaseFieldDefinitions in tests/
src/ Unit/ EckEntityTest.php - Tests base field definitions.
- UnitTestBase::setUp in tests/
src/ Unit/ UnitTestBase.php
File
- tests/
src/ Unit/ UnitTestBase.php, line 128
Class
- UnitTestBase
- Base class for unit tests.
Namespace
Drupal\Tests\eck\UnitCode
protected function registerServiceWithContainerMock($service_id, $service) {
$this->services[$service_id] = $service;
}