You are here

private function UnitTestBase::addMockServicesToContainer in Select (or other) 8

Same name and namespace in other branches
  1. 4.x tests/src/Unit/UnitTestBase.php \Drupal\Tests\select_or_other\Unit\UnitTestBase::addMockServicesToContainer()

Adds mocked services to the container.

1 call to UnitTestBase::addMockServicesToContainer()
UnitTestBase::setUp in tests/src/Unit/UnitTestBase.php

File

tests/src/Unit/UnitTestBase.php, line 60

Class

UnitTestBase

Namespace

Drupal\Tests\select_or_other\Unit

Code

private function addMockServicesToContainer() {
  $this
    ->registerServiceWithContainerMock('current_user', $this
    ->getNewUserMock());
  $this
    ->registerServiceWithContainerMock('entity_type.manager', $this
    ->getNewEntityTypeManagerMock());
}