You are here

protected function ThunderTestTrait::doInstall in Thunder 6.0.x

Same name and namespace in other branches
  1. 8.5 tests/src/Traits/ThunderTestTrait.php \Drupal\Tests\thunder\Traits\ThunderTestTrait::doInstall()
  2. 8.2 tests/src/Traits/ThunderTestTrait.php \Drupal\Tests\thunder\Traits\ThunderTestTrait::doInstall()
  3. 8.3 tests/src/Traits/ThunderTestTrait.php \Drupal\Tests\thunder\Traits\ThunderTestTrait::doInstall()
  4. 8.4 tests/src/Traits/ThunderTestTrait.php \Drupal\Tests\thunder\Traits\ThunderTestTrait::doInstall()
  5. 6.2.x tests/src/Traits/ThunderTestTrait.php \Drupal\Tests\thunder\Traits\ThunderTestTrait::doInstall()
  6. 6.1.x tests/src/Traits/ThunderTestTrait.php \Drupal\Tests\thunder\Traits\ThunderTestTrait::doInstall()
1 call to ThunderTestTrait::doInstall()
ThunderTestTrait::installDrupal in tests/src/Traits/ThunderTestTrait.php

File

tests/src/Traits/ThunderTestTrait.php, line 110

Class

ThunderTestTrait
Use this trait to reuse an existing database.

Namespace

Drupal\Tests\thunder\Traits

Code

protected function doInstall() {
  if (!empty($_SERVER['thunderDumpFile']) && file_exists($_SERVER['thunderDumpFile'])) {
    $file = $_SERVER['thunderDumpFile'];

    // Load the database.
    if (substr($file, -3) == '.gz') {
      $file = "compress.zlib://{$file}";
    }
    require $file;
  }
  else {
    parent::doInstall();
  }
}