function Upgrade7Test::assertFollowUpMigrationResults

Same name in other branches
  1. 8.9.x core/modules/migrate_drupal_ui/tests/src/Functional/d7/Upgrade7Test.php \Drupal\Tests\migrate_drupal_ui\Functional\d7\Upgrade7Test::assertFollowUpMigrationResults()
  2. 10 core/modules/migrate_drupal_ui/tests/src/Functional/d7/Upgrade7Test.php \Drupal\Tests\migrate_drupal_ui\Functional\d7\Upgrade7Test::assertFollowUpMigrationResults()
  3. 11.x core/modules/migrate_drupal_ui/tests/src/Functional/d7/Upgrade7Test.php \Drupal\Tests\migrate_drupal_ui\Functional\d7\Upgrade7Test::assertFollowUpMigrationResults()

Tests that follow-up migrations have been run successfully.

@internal

1 call to Upgrade7Test::assertFollowUpMigrationResults()
Upgrade7Test::testUpgradeAndIncremental in core/modules/migrate_drupal_ui/tests/src/Functional/d7/Upgrade7Test.php
Executes all steps of migrations upgrade.

File

core/modules/migrate_drupal_ui/tests/src/Functional/d7/Upgrade7Test.php, line 242

Class

Upgrade7Test
Tests Drupal 7 upgrade using the migrate UI.

Namespace

Drupal\Tests\migrate_drupal_ui\Functional\d7

Code

protected function assertFollowUpMigrationResults() : void {
    $node = Node::load(2);
    $this->assertSame('4', $node->get('field_reference')->target_id);
    $this->assertSame('6', $node->get('field_reference_2')->target_id);
    $translation = $node->getTranslation('is');
    $this->assertSame('4', $translation->get('field_reference')->target_id);
    $this->assertSame('4', $translation->get('field_reference_2')->target_id);
    $node = Node::load(4);
    $this->assertSame('2', $node->get('field_reference')->target_id);
    $this->assertSame('2', $node->get('field_reference_2')->target_id);
    $translation = $node->getTranslation('en');
    $this->assertSame('2', $translation->get('field_reference')->target_id);
    $this->assertSame('2', $translation->get('field_reference_2')->target_id);
    $user = User::load(2);
    $this->assertSame('2', $user->get('field_reference')->target_id);
}

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