You are here

protected function EntityEmbedUpdateHookTest::setUp in Entity Embed 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

File

tests/src/Functional/EntityEmbedUpdateHookTest.php, line 27

Class

EntityEmbedUpdateHookTest
Tests the update hooks in entity_embed module.

Namespace

Drupal\Tests\entity_embed\Functional

Code

protected function setUp() {
  parent::setUp();
  $button = $this->container
    ->get('entity_type.manager')
    ->getDefinition('embed_button');
  $this->container
    ->get('entity.last_installed_schema.repository')
    ->setLastInstalledDefinition($button);
}