function MigrationTest::getValidMigrationDependenciesProvider

Same name in other branches
  1. 9 core/modules/migrate/tests/src/Unit/MigrationTest.php \Drupal\Tests\migrate\Unit\MigrationTest::getValidMigrationDependenciesProvider()
  2. 8.9.x core/modules/migrate/tests/src/Unit/MigrationTest.php \Drupal\Tests\migrate\Unit\MigrationTest::getValidMigrationDependenciesProvider()
  3. 11.x core/modules/migrate/tests/src/Unit/MigrationTest.php \Drupal\Tests\migrate\Unit\MigrationTest::getValidMigrationDependenciesProvider()

Provides data for valid migration configuration test.

File

core/modules/migrate/tests/src/Unit/MigrationTest.php, line 215

Class

MigrationTest
@coversDefaultClass \Drupal\migrate\Plugin\Migration

Namespace

Drupal\Tests\migrate\Unit

Code

public static function getValidMigrationDependenciesProvider() {
    return [
        [
            'source' => NULL,
            'expected_value' => [
                'required' => [],
                'optional' => [],
            ],
        ],
        [
            'source' => [],
            'expected_value' => [
                'required' => [],
                'optional' => [],
            ],
        ],
        [
            'source' => [
                'required' => [
                    'test_migration',
                ],
            ],
            'expected_value' => [
                'required' => [
                    'test_migration',
                ],
                'optional' => [],
            ],
        ],
        [
            'source' => [
                'optional' => [
                    'test_migration',
                ],
            ],
            'expected_value' => [
                'optional' => [
                    'test_migration',
                ],
                'required' => [],
            ],
        ],
        [
            'source' => [
                'required' => [
                    'req_test_migration',
                ],
                'optional' => [
                    'opt_test_migration',
                ],
            ],
            'expected_value' => [
                'required' => [
                    'req_test_migration',
                ],
                'optional' => [
                    'opt_test_migration',
                ],
            ],
        ],
    ];
}

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