You are here

protected function EntityKernelTestBase::refreshServices in Drupal 10

Same name and namespace in other branches
  1. 8 core/tests/Drupal/KernelTests/Core/Entity/EntityKernelTestBase.php \Drupal\KernelTests\Core\Entity\EntityKernelTestBase::refreshServices()
  2. 9 core/tests/Drupal/KernelTests/Core/Entity/EntityKernelTestBase.php \Drupal\KernelTests\Core\Entity\EntityKernelTestBase::refreshServices()

Refresh services.

File

core/tests/Drupal/KernelTests/Core/Entity/EntityKernelTestBase.php, line 168

Class

EntityKernelTestBase
Defines an abstract test base for entity kernel tests.

Namespace

Drupal\KernelTests\Core\Entity

Code

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