protected function UnitTestBase::setUp in Entity Construction Kit (ECK) 8
Overrides UnitTestCase::setUp
1 call to UnitTestBase::setUp()
- PermissionsGeneratorTest::setUp in tests/
src/ Unit/ PermissionsGeneratorTest.php
1 method overrides UnitTestBase::setUp()
- PermissionsGeneratorTest::setUp in tests/
src/ Unit/ PermissionsGeneratorTest.php
File
- tests/
src/ Unit/ UnitTestBase.php, line 36
Class
- UnitTestBase
- Base class for unit tests.
Namespace
Drupal\Tests\eck\UnitCode
protected function setUp() {
parent::setUp();
$this->entities = [];
$this
->prepareContainer();
$this
->registerServiceWithContainerMock('current_user', $this
->getNewUserMock());
$this
->registerServiceWithContainerMock('entity_type.manager', $this
->getEntityTypeManagerMock());
$this
->registerServiceWithContainerMock('entity_type.repository', $this
->getEntityTypeRepositoryMock());
$this
->registerServiceWithContainerMock('plugin.manager.field.field_type', new FieldTypePluginManagerMock());
}