You are here

public function InstallTest::testInstallDuringSync in File Entity Browser 8

Tests if the module can be installed during a config sync.

File

tests/src/Functional/InstallTest.php, line 35

Class

InstallTest
Tests install/uninstall routines for File Browser.

Namespace

Drupal\Tests\file_browser\Functional

Code

public function testInstallDuringSync() {

  // Export config post-module install.
  $active = $this->container
    ->get('config.storage');
  $sync = $this->container
    ->get('config.storage.sync');
  $this
    ->copyConfig($active, $sync);

  // Uninstall File browser.

  /** @var \Drupal\Core\Extension\ModuleInstaller $module_installer */
  $module_installer = $this->container
    ->get('module_installer');
  $module_installer
    ->uninstall([
    'file_browser',
  ]);

  // Import config.
  $this
    ->configImporter()
    ->import();
}