function EntityKernelTestBase::refreshServices

Same name in other branches
  1. 9 core/tests/Drupal/KernelTests/Core/Entity/EntityKernelTestBase.php \Drupal\KernelTests\Core\Entity\EntityKernelTestBase::refreshServices()
  2. 8.9.x core/tests/Drupal/KernelTests/Core/Entity/EntityKernelTestBase.php \Drupal\KernelTests\Core\Entity\EntityKernelTestBase::refreshServices()
  3. 11.x 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 187

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');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.