You are here

protected function TaxonomyAccessFixTestTrait::installModules in Taxonomy access fix 8.2

Same name and namespace in other branches
  1. 8.3 tests/src/Traits/TaxonomyAccessFixTestTrait.php \Drupal\Tests\taxonomy_access_fix\Traits\TaxonomyAccessFixTestTrait::installModules()

Installs modules and rebuilds all data structures.

Parameters

array $modules: Modules to install.

1 call to TaxonomyAccessFixTestTrait::installModules()
TermAccessTest::testTermAccess in tests/src/Functional/TermAccessTest.php
Test access control functionality for taxonomy terms.

File

tests/src/Traits/TaxonomyAccessFixTestTrait.php, line 170

Class

TaxonomyAccessFixTestTrait
Provides common methods for functional tests of Taxonomy Access Fix module.

Namespace

Drupal\Tests\taxonomy_access_fix\Traits

Code

protected function installModules(array $modules) {
  $module_installer = $this->container
    ->get('module_installer');
  $is_module_installed = $module_installer
    ->install($modules, TRUE);
  $this
    ->assertTrue($is_module_installed, new FormattableMarkup('Enabled modules: %modules', [
    '%modules' => 'taxonomy_access_fix',
  ]));
  $this
    ->rebuildAll();
}