You are here

protected function EntityUnitTestBase::refreshServices in Drupal 8

Refresh services.

2 calls to EntityUnitTestBase::refreshServices()
EntityUnitTestBase::installModule in core/modules/system/src/Tests/Entity/EntityUnitTestBase.php
Installs a module and refreshes services.
EntityUnitTestBase::uninstallModule in core/modules/system/src/Tests/Entity/EntityUnitTestBase.php
Uninstalls a module and refreshes services.

File

core/modules/system/src/Tests/Entity/EntityUnitTestBase.php, line 182

Class

EntityUnitTestBase
Defines an abstract test base for entity unit tests.

Namespace

Drupal\system\Tests\Entity

Code

protected function refreshServices() {
  $this->container = \Drupal::getContainer();
  $this->entityManager = $this->container
    ->get('entity.manager');
  $this->state = $this->container
    ->get('state');
}