You are here

protected static function CommerceMigrateBaseTestCase::extraModules in Commerce Migrate 7

Returns list of additional modules for enable before test will be run.

Return value

string[] List of module names.

Throws

\Exception

1 call to CommerceMigrateBaseTestCase::extraModules()
CommerceMigrateBaseTestCase::setUp in tests/commerce_migrate_base.test
Sets up a Drupal site for running functional and integration tests.

File

tests/commerce_migrate_base.test, line 61
Base facade for "Commerce Migrate" tests.

Class

CommerceMigrateBaseTestCase
Class CommerceMigrateBaseTestCase.

Code

protected static function extraModules() {
  $test_class = get_called_class();
  if (!method_exists($test_class, 'getInfo')) {
    throw new \Exception(format_string('The "@method" is not implemented by "@test_class" test class!', array(
      '@method' => __METHOD__,
      '@test_class' => $test_class,
    )));
  }
  $info = $test_class::getInfo();
  $modules = array(
    'migrate',
    'migrate_extras',
    'commerce_migrate',
    'commerce_migrate_example',
  );

  // Prepend test dependencies.
  if (!empty($info['dependencies'])) {
    $modules = array_merge($modules, $info['dependencies']);
  }
  return $modules;
}