You are here

protected function MigrateMediaTestBase::getAvailablePaths in Media Migration 8

Gets the available upgrade paths.

Return value

string[] An array of available upgrade paths.

Overrides MigrateUpgradeTestBase::getAvailablePaths

1 call to MigrateMediaTestBase::getAvailablePaths()
MigrateMediaTestBase::assertMigrateUpgradeViaUi in tests/src/Functional/MigrateMediaTestBase.php
Executes the upgrade process by the UI and asserts basic expectations.

File

tests/src/Functional/MigrateMediaTestBase.php, line 297

Class

MigrateMediaTestBase
Provides a base class for testing media migration via the UI.

Namespace

Drupal\Tests\media_migration\Functional

Code

protected function getAvailablePaths() {
  $available_paths = [
    'block',
    'color',
    'comment',
    'ctools',
    'dashboard',
    'dblog',
    'field',
    'field_sql_storage',
    'file',
    'filter',
    'image',
    'list',
    'menu',
    'node',
    'number',
    'options',
    'path',
    'rdf',
    'search',
    'shortcut',
    'system',
    'taxonomy',
    'text',
    'user',
    // Include modules that do not have an upgrade path and are enabled in the
    // source database.
    'contextual',
    'field_ui',
    'help',
    'toolbar',
  ];

  // No idea why, but Drupal 9 threats available/missing migration paths
  // different than prior versions.
  if (version_compare(\Drupal::VERSION, '9.0', '<')) {
    $available_paths[] = 'file_entity';
  }

  // Drupal 9.1+ checks the human name of the modules.
  if (version_compare(\Drupal::VERSION, '9.1', '>=')) {
    $available_paths = [
      'Block',
      'Chaos tools',
      'Color',
      'Comment',
      'Contextual links',
      'Dashboard',
      'Database logging',
      'Field',
      'Field SQL storage',
      'Field UI',
      'File',
      'Filter',
      'Help',
      'Image',
      'List',
      'Menu',
      'Node',
      'Number',
      'Options',
      'Path',
      'RDF',
      'Search',
      'Shortcut',
      'System',
      'Taxonomy',
      'Text',
      'Toolbar',
      'User',
    ];
  }
  return $available_paths;
}