You are here

protected function Upgrade7Test::assertFollowUpMigrationResults in Drupal 9

Same name and namespace in other branches
  1. 8 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()

Tests that follow-up migrations have been run successfully.

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 237

Class

Upgrade7Test
Tests Drupal 7 upgrade using the migrate UI.

Namespace

Drupal\Tests\migrate_drupal_ui\Functional\d7

Code

protected function assertFollowUpMigrationResults() {
  $node = Node::load(2);
  $this
    ->assertSame('4', $node
    ->get('field_reference')->target_id);
  $this
    ->assertSame('4', $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);
}