You are here

public function MigrationTest::getValidMigrationDependenciesProvider 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::getValidMigrationDependenciesProvider()

Provides data for valid migration configuration test.

File

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

Class

MigrationTest
@coversDefaultClass \Drupal\migrate\Plugin\Migration

Namespace

Drupal\Tests\migrate\Unit

Code

public 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',
        ],
      ],
    ],
  ];
}