You are here

protected function EntityKernelTestBase::refreshServices in Drupal 9

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

Refresh services.

4 calls to EntityKernelTestBase::refreshServices()
EntityKernelTestBase::installModule in core/tests/Drupal/KernelTests/Core/Entity/EntityKernelTestBase.php
Installs a module and refreshes services.
EntityKernelTestBase::uninstallModule in core/tests/Drupal/KernelTests/Core/Entity/EntityKernelTestBase.php
Uninstalls a module and refreshes services.
EntitySchemaTest::refreshServices in core/tests/Drupal/KernelTests/Core/Entity/EntitySchemaTest.php
Refresh services.
LayoutBuilderCompatibilityTestBase::installLayoutBuilder in core/modules/layout_builder/tests/src/Kernel/LayoutBuilderCompatibilityTestBase.php
Installs the Layout Builder.
1 method overrides EntityKernelTestBase::refreshServices()
EntitySchemaTest::refreshServices in core/tests/Drupal/KernelTests/Core/Entity/EntitySchemaTest.php
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');
}