You are here

public function ExtraFieldBrowserTestBase::setupEnableExtraFieldTestModule in Extra Field 8

Enables the extra field test module.

The extra_field_test module must be enabled _after_ entity types are created. Enabling it earlier will lead to a situation where ExtraFieldDisplayManager::allEntityBundles caches only the first node type that was created. It is expected that this situation will not occur outside of tests.

3 calls to ExtraFieldBrowserTestBase::setupEnableExtraFieldTestModule()
ExtraFieldDisplayFieldTest::setUp in tests/src/Functional/ExtraFieldDisplayFieldTest.php
ExtraFieldDisplayUITest::setUp in tests/src/Functional/ExtraFieldDisplayUITest.php
ExtraFieldDisplayViewTest::setUp in tests/src/Functional/ExtraFieldDisplayViewTest.php

File

tests/src/Functional/ExtraFieldBrowserTestBase.php, line 78

Class

ExtraFieldBrowserTestBase
Base class for Extra Field browser tests.

Namespace

Drupal\Tests\extra_field\Functional

Code

public function setupEnableExtraFieldTestModule() {
  $modules = [
    'extra_field_test',
  ];
  $success = $this->container
    ->get('module_installer')
    ->install($modules, TRUE);
  $this
    ->assertTrue($success, new FormattableMarkup('Enabled modules: %modules', [
    '%modules' => implode(', ', $modules),
  ]));
  $this
    ->resetAll();
}