You are here

public function DrushWithCoreMigrationsFromFileTest::setUp in Media Migration 8

Overrides DrushTestBase::setUp

File

tests/src/Functional/DrushWithCoreMigrationsFromFileTest.php, line 27

Class

DrushWithCoreMigrationsFromFileTest
Tests Migrate Tools and Drush compatibility – verifies usage steps in README.

Namespace

Drupal\Tests\media_migration\Functional

Code

public function setUp() {
  parent::setUp();

  // Modify source site's file public path settings for being able to migrate
  // files. (This is required for the "d7_file" migration.)
  $source_dir = DRUPAL_ROOT . DIRECTORY_SEPARATOR . drupal_get_path('module', 'media_migration') . '/tests/fixtures/sites/default/files';
  $this->sourceDatabase
    ->upsert('variable')
    ->key('name')
    ->fields([
    'name' => 'file_public_path',
    'value' => serialize($source_dir),
  ])
    ->execute();
}