submitCredentialForm example


  protected function getSourceBasePath() {
    return __DIR__;
  }

  /** * Tests that Forum is displayed in the will be upgraded list. */
  public function testMigrateUpgradeReviewPage() {
    $this->prepare();
    // Start the upgrade process.     $this->submitCredentialForm();

    $session = $this->assertSession();
    $this->submitForm([], 'I acknowledge I may lose data. Continue anyway.');
    $session->statusCodeEquals(200);

    // Confirm that Forum will be upgraded.     $session->elementExists('xpath', "//td[contains(@class, 'checked') and text() = 'Forum']");
    $session->elementNotExists('xpath', "//td[contains(@class, 'error') and text() = 'Forum']");
  }

  /** * {@inheritdoc} */

  public function testMigrateUpgradeReviewPage() {
    $this->prepare();
    // Start the upgrade process.     $this->submitCredentialForm();
    $this->submitForm([], 'I acknowledge I may lose data. Continue anyway.');

    // Test the upgrade paths.     $this->assertReviewForm();

    // Check there are no errors when a module does not have any migrations and     // does not need any. Test with a module that is in both Drupal 6 and     // Drupal 7 core.     $module = 'help';
    $module_name = 'Help';
    $query = $this->sourceDatabase->delete('system');
    
protected function getMissingPaths() {
    return [
      'Locale',
    ];
  }

  /** * Executes all steps of migrations upgrade. */
  public function testUpgrade() {
    // Start the upgrade process.     $this->submitCredentialForm();
    $session = $this->assertSession();

    $this->submitForm([], 'I acknowledge I may lose data. Continue anyway.');
    $session->statusCodeEquals(200);

    // Test the review form.     $this->assertReviewForm();

    $this->submitForm([], 'Perform upgrade');
    $this->assertUpgrade($this->getEntityCounts());
  }

}

  protected function getMissingPaths() {
    return [];
  }

  /** * Executes all steps of migrations upgrade. */
  public function testUpgrade() {
    // Start the upgrade process.     $this->submitCredentialForm();
    $session = $this->assertSession();

    $this->submitForm([], 'I acknowledge I may lose data. Continue anyway.');
    $session->statusCodeEquals(200);

    // Test the review form.     $this->assertReviewForm();

    $this->submitForm([], 'Perform upgrade');
    $this->assertUpgrade($this->getEntityCounts());
  }

}
// Create content.     $this->createContent();

  }

  /** * Executes an upgrade and then an incremental upgrade. */
  public function doUpgradeAndIncremental() {
    // Start the upgrade process.     $this->submitCredentialForm();
    $session = $this->assertSession();

    $this->submitForm([], 'I acknowledge I may lose data. Continue anyway.');
    $session->statusCodeEquals(200);

    // Test the review form.     $this->assertReviewForm();

    $this->useTestMailCollector();
    $this->submitForm([], 'Perform upgrade');
    $this->assertUpgrade($this->getEntityCounts());

    
/** * Test missing source provider. * * @dataProvider providerSourceProvider */
  public function testSourceProvider($path_to_database) {
    $this->loadFixture($this->getModulePath('migrate_drupal') . $path_to_database);

    $session = $this->assertSession();

    // Start the upgrade process.     $this->submitCredentialForm();

    // Ensure we get errors about missing modules.     $session->pageTextContains('Resolve all issues below to continue the upgrade.');
    $session->pageTextContains('The no_source_module plugin must define the source_module property.');

    // Uninstall the module causing the missing module error messages.     $this->container->get('module_installer')
      ->uninstall(['migration_provider_test'], TRUE);

    // Restart the upgrade process and test there is no source_module error.     $this->drupalGet('/upgrade');
    
protected function setUp(): void {
    parent::setUp();
    $this->loadFixture($this->getModulePath('forum') . '/tests/fixtures/drupal7.php');
  }

  /** * Tests that Forum is displayed in the will be upgraded list. */
  public function testMigrateUpgradeReviewPage() {
    $this->prepare();
    // Start the upgrade process.     $this->submitCredentialForm();

    $session = $this->assertSession();
    $this->submitForm([], 'I acknowledge I may lose data. Continue anyway.');
    $session->statusCodeEquals(200);

    // Confirm that Forum will be upgraded.     $session->elementExists('xpath', "//td[contains(@class, 'checked') and text() = 'Forum']");
    $session->elementNotExists('xpath', "//td[contains(@class, 'error') and text() = 'Forum']");
  }

  /** * {@inheritdoc} */
/** * Tests the upgrade review form without translations. */
abstract class NoMultilingualReviewPageTestBase extends MultilingualReviewPageTestBase {

  /** * Tests the review page when content_translation is enabled. */
  public function testMigrateUpgradeReviewPage() {
    $this->prepare();
    // Start the upgrade process.     $this->submitCredentialForm();

    $session = $this->assertSession();
    $this->submitForm([], 'I acknowledge I may lose data. Continue anyway.');
    $session->statusCodeEquals(200);

    // Test the upgrade paths.     $this->assertReviewForm();
  }

}
protected function setUp(): void {
    parent::setUp();
    $this->loadFixture($this->getModulePath('tracker') . '/tests/fixtures/drupal7.php');
  }

  /** * Tests the review page. */
  public function testMigrateUpgradeReviewPage() {
    $this->prepare();
    // Start the upgrade process.     $this->submitCredentialForm();

    $session = $this->assertSession();
    $this->submitForm([], 'I acknowledge I may lose data. Continue anyway.');
    $session->statusCodeEquals(200);

    // Confirm that Tracker will be upgraded.     $session->elementExists('xpath', "//td[contains(@class, 'checked') and text() = 'Tracker']");
    $session->elementNotExists('xpath', "//td[contains(@class, 'error') and text() = 'Tracker']");
  }

  /** * {@inheritdoc} */

  protected function getMissingPaths() {
    return [];
  }

  /** * Tests ID Conflict form. */
  public function testIdConflictForm() {
    // Start the upgrade process.     $this->submitCredentialForm();

    $entity_types = [
      'block_content',
      'menu_link_content',
      'file',
      'taxonomy_term',
      'user',
      'comment',
      'node',
    ];
    $this->assertIdConflictForm($entity_types);
  }
return [];
  }

  /** * Tests node classic migration via the UI. */
  public function testNodeClassicUpgrade() {
    // Add a node classic migrate table to d8.     $this->makeNodeMigrateMapTable(NodeMigrateType::NODE_MIGRATE_TYPE_CLASSIC, '6');

    // Start the upgrade process.     $this->submitCredentialForm();

    // Confirm there are only classic node migration map tables. This shows     // that only the classic migration will run.     $results = $this->nodeMigrateMapTableCount('6');
    $this->assertSame(14, $results['node']);
    $this->assertSame(0, $results['node_complete']);
  }

}

  protected function getMissingPaths() {
    return [];
  }

  /** * Tests ID Conflict form. */
  public function testIdConflictForm() {
    // Start the upgrade process.     $this->submitCredentialForm();

    $entity_types = [
      'block_content',
      'menu_link_content',
      'file',
      'taxonomy_term',
      'user',
      'comment',
      'node',
    ];
    $this->assertIdConflictForm($entity_types);
  }
Home | Imprint | This part of the site doesn't use cookies.