You are here

protected function DrushWithCoreMigrationsFromMediaTest::setUp in Media Migration 8

Overrides DrushTestBase::setUp

File

tests/src/Functional/DrushWithCoreMigrationsFromMediaTest.php, line 20

Class

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

Namespace

Drupal\Tests\media_migration\Functional

Code

protected 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();
}