You are here

public function SearchApiSortsUpdateBase::setUp in Search API sorts 8

Overrides WebTestBase::setUp() for update testing.

The main difference in this method is that rather than performing the installation via the installer, a database is loaded. Additional work is then needed to set various things such as the config directories and the container that would normally be done via the installer.

Overrides UpdatePathTestBase::setUp

1 call to SearchApiSortsUpdateBase::setUp()
SearchApiSortsUpdate8103Test::setUp in tests/src/Functional/Update/SearchApiSortsUpdate8103Test.php
Overrides WebTestBase::setUp() for update testing.
1 method overrides SearchApiSortsUpdateBase::setUp()
SearchApiSortsUpdate8103Test::setUp in tests/src/Functional/Update/SearchApiSortsUpdate8103Test.php
Overrides WebTestBase::setUp() for update testing.

File

tests/src/Functional/Update/SearchApiSortsUpdateBase.php, line 46

Class

SearchApiSortsUpdateBase
Base class for search_api_sorts update tests.

Namespace

Drupal\Tests\search_api_sorts\Functional\Update

Code

public function setUp() : void {
  parent::setUp();

  // We need to manually set our entity types as "installed".
  foreach ($this
    ->getEntityTypesFromClassProperty() as $entity_type_id) {
    $entity_type = $this->container
      ->get('entity_type.manager')
      ->getDefinition($entity_type_id);
    $this->container
      ->get('entity_type.listener')
      ->onEntityTypeCreate($entity_type);
  }
}