You are here

protected function MigrateUpgradeCommandsTest::executeMigrateUpgrade in Migrate Upgrade 8.3

Execute Drush migrate:upgrade command.

Parameters

array $options: The Drush command options.

1 call to MigrateUpgradeCommandsTest::executeMigrateUpgrade()
MigrateUpgradeCommandsTest::testDrupalConfigureUpgrade in tests/src/Functional/MigrateUpgradeCommandsTest.php
Test module using Drupal fixture.

File

tests/src/Functional/MigrateUpgradeCommandsTest.php, line 96

Class

MigrateUpgradeCommandsTest
Execute drush on fully functional website.

Namespace

Drupal\Tests\migrate_upgrade\Functional

Code

protected function executeMigrateUpgrade(array $options = []) : void {
  $options += [
    'format' => 'json',
    'fields' => '*',
  ];
  $connection_options = $this->sourceDatabase
    ->getConnectionOptions();
  $options['legacy-db-url'] = $this
    ->convertDbSpecUrl($connection_options);
  if (!empty($connection_options['prefix']['default'])) {
    $options['legacy-db-prefix'] = $connection_options['prefix']['default'];
  }
  $this
    ->drush('migrate:upgrade', [], $options);
}