You are here

protected function MigrationTestBase::setDatabaseDumpFiles in Lightning Workflow 8.3

Same name and namespace in other branches
  1. 8.2 modules/lightning_scheduler/tests/src/Functional/MigrationTestBase.php \Drupal\Tests\lightning_scheduler\Functional\MigrationTestBase::setDatabaseDumpFiles()

Set database dump files to be used.

Overrides UpdatePathTestBase::setDatabaseDumpFiles

File

modules/lightning_scheduler/tests/src/Functional/MigrationTestBase.php, line 15

Class

MigrationTestBase
Base class for testing migration of old Lightning Scheduler data.

Namespace

Drupal\Tests\lightning_scheduler\Functional

Code

protected function setDatabaseDumpFiles() {
  $this->databaseDumpFiles = [];
  $fixture = $this
    ->getDrupalRoot() . '/core/modules/system/tests/fixtures/update/drupal-8.8.0.bare.standard.php.gz';

  // If we're on Drupal 8.8 or later, use its base fixture. Otherwise, use the
  // older 8.4 base fixture included with versions of core before 8.8.
  if (file_exists($fixture)) {
    $this->databaseDumpFiles[] = $fixture;
  }
  else {
    $this->databaseDumpFiles[] = str_replace('8.8.0', '8.4.0', $fixture);
  }
  $this->databaseDumpFiles[] = __DIR__ . '/../../fixtures/BaseFieldMigrationTest.php.gz';
}