function MigrationTest::testMigrationDependenciesWithValidConfig

Same name in other branches
  1. 9 core/modules/migrate/tests/src/Unit/MigrationTest.php \Drupal\Tests\migrate\Unit\MigrationTest::testMigrationDependenciesWithValidConfig()
  2. 10 core/modules/migrate/tests/src/Unit/MigrationTest.php \Drupal\Tests\migrate\Unit\MigrationTest::testMigrationDependenciesWithValidConfig()
  3. 11.x 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

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

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.