You are here

protected function EntityBrowserUpdateHookTest::setUp in Entity Browser 8

Same name and namespace in other branches
  1. 8.2 tests/src/Functional/EntityBrowserUpdateHookTest.php \Drupal\Tests\entity_browser\Functional\EntityBrowserUpdateHookTest::setUp()

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/EntityBrowserUpdateHookTest.php, line 32

Class

EntityBrowserUpdateHookTest
Tests the update hooks in entity_browser module.

Namespace

Drupal\Tests\entity_browser\Functional

Code

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