MigrationPluginManager example

/** * {@inheritdoc} */
  protected function setUp(): void {
    parent::setUp();

    // Get a plugin manager for testing.     $module_handler = $this->createMock('Drupal\Core\Extension\ModuleHandlerInterface');
    $cache_backend = $this->createMock('Drupal\Core\Cache\CacheBackendInterface');
    $language_manager = $this->createMock('Drupal\Core\Language\LanguageManagerInterface');
    $this->pluginManager = new MigrationPluginManager($module_handler$cache_backend$language_manager);
  }

  /** * Tests building dependencies for multiple migrations. * * @dataProvider dependencyProvider */
  public function testDependencyBuilding($migrations_data$result_ids) {
    $migrations = [];
    foreach ($migrations_data as $migration_id => $migration_data) {
      $migrations[$migration_id] = new TestMigrationMock($migration_id$migration_data['migration_dependencies']);
    }
Home | Imprint | This part of the site doesn't use cookies.