You are here

protected function NodeorderInstallTestBase::setUp in Node Order 8

Overrides KernelTestBase::setUp

File

tests/src/Kernel/NodeorderInstallTestBase.php, line 36

Class

NodeorderInstallTestBase
Base class for module installation and uninstallation tests.

Namespace

Drupal\Tests\nodeorder\Kernel

Code

protected function setUp() {
  parent::setUp();
  $this->moduleInstaller = $this->container
    ->get('module_installer');
  $this->database = $this->container
    ->get('database');
  $this
    ->installEntitySchema('user');
  $this
    ->installSchema('user', [
    'users_data',
  ]);
  $this
    ->installEntitySchema('taxonomy_term');
  $this
    ->installConfig([
    'filter',
    'user',
    'taxonomy',
  ]);

  // Manually load and enable/install module.
  // This allows to call hook_install() properly.
  module_load_install('nodeorder');
  $this->moduleInstaller
    ->install([
    'nodeorder',
  ]);
}