You are here

public function MigrationTest::testMigrationDependenciesWithValidConfig in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/migrate/tests/src/Unit/MigrationTest.php \Drupal\Tests\migrate\Unit\MigrationTest::testMigrationDependenciesWithValidConfig()

Tests valid migration dependencies configuration returns expected values.

@covers ::getMigrationDependencies @dataProvider getValidMigrationDependenciesProvider

Parameters

array|null $source: The migration dependencies configuration being tested.

array $expected_value: The migration dependencies configuration array expected.

Throws

\Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException

File

core/modules/migrate/tests/src/Unit/MigrationTest.php, line 129
Contains \Drupal\Tests\migrate\Unit\MigrationTest.

Class

MigrationTest
@coversDefaultClass \Drupal\migrate\Plugin\Migration

Namespace

Drupal\Tests\migrate\Unit

Code

public function testMigrationDependenciesWithValidConfig($source, array $expected_value) {
  $migration = new TestMigration();
  if (!is_null($source)) {
    $migration
      ->set('migration_dependencies', $source);
  }
  $this
    ->assertSame($migration
    ->getMigrationDependencies(), $expected_value);
}