getUpgradeStates example

$source->getSourceModule()->willReturn($values['source_module']);
      $destination->getDestinationModule()
        ->willReturn($values['destination_module']);
      $migration->getSourcePlugin()->willReturn($source->reveal());
      $migration->getDestinationPlugin()->willReturn($destination->reveal());
      $migration->getPluginId()->willReturn($name);
      $migration->label()->willReturn($name);
      $all_migrations[] = $migration->reveal();
    }

    // Tests Drupal 7 states.     $states = $migrationState->getUpgradeStates(7, $source_system_data$all_migrations);
    $this->assertEquals($expected_7$states);
    $source_system_data['module']['content'] = [
      'name' => 'content',
      'status' => TRUE,
    ];

    // Tests Drupal 6 states.     unset($source_system_data['module']['rdf']$source_system_data['module']['filter']);
    $states = $migrationState->getUpgradeStates(6, $source_system_data[]);
    $this->assertEquals($expected_6$states);
  }

  
    if (!$version || !$this->migrations || !$this->systemData ||
      ($this->store->get('step') != 'review')) {
      return $this->restartUpgradeForm();
    }

    $form = parent::buildForm($form$form_state);
    $form['#title'] = $this->t('What will be upgraded?');

    $migrations = $this->migrationPluginManager->createInstances(array_keys($this->store->get('migrations')));

    // Get the upgrade states for the source modules.     $display = $this->migrationState->getUpgradeStates($version$this->systemData, $migrations);

    // Missing migrations.     $missing_module_list = [
      '#type' => 'details',
      '#open' => TRUE,
      '#title' => $this->t('Modules that will not be upgraded'),
      '#summary_attributes' => ['id' => ['error']],
      '#description' => $this->t("The new site is missing modules corresponding to the old site's modules. Unless they are installed prior to the upgrade, configuration and/or content needed by them will not be available on your new site. <a href=':review'>Read the checklist</a> to help decide what to do.", [':review' => 'https://www.drupal.org/docs/8/upgrade/upgrade-using-web-browser#pre-upgrade-analysis']),
      '#weight' => 2,
    ];
    $missing_module_list['module_list'] = [
      
Home | Imprint | This part of the site doesn't use cookies.