You are here

protected function Upgrade6Test::assertFollowUpMigrationResults in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/migrate_drupal_ui/tests/src/Functional/d6/Upgrade6Test.php \Drupal\Tests\migrate_drupal_ui\Functional\d6\Upgrade6Test::assertFollowUpMigrationResults()
  2. 10 core/modules/migrate_drupal_ui/tests/src/Functional/d6/Upgrade6Test.php \Drupal\Tests\migrate_drupal_ui\Functional\d6\Upgrade6Test::assertFollowUpMigrationResults()

Tests that follow-up migrations have been run successfully.

1 call to Upgrade6Test::assertFollowUpMigrationResults()
Upgrade6Test::testMigrateUpgradeExecute in core/modules/migrate_drupal_ui/tests/src/Functional/d6/Upgrade6Test.php
Executes all steps of migrations upgrade.

File

core/modules/migrate_drupal_ui/tests/src/Functional/d6/Upgrade6Test.php, line 218

Class

Upgrade6Test
Tests Drupal 6 upgrade using the migrate UI.

Namespace

Drupal\Tests\migrate_drupal_ui\Functional\d6

Code

protected function assertFollowUpMigrationResults() {
  $node = Node::load(10);
  $this
    ->assertSame('12', $node
    ->get('field_reference')->target_id);
  $this
    ->assertSame('12', $node
    ->get('field_reference_2')->target_id);
  $translation = $node
    ->getTranslation('fr');
  $this
    ->assertSame('12', $translation
    ->get('field_reference')->target_id);
  $this
    ->assertSame('12', $translation
    ->get('field_reference_2')->target_id);
  $node = Node::load(12)
    ->getTranslation('en');
  $this
    ->assertSame('10', $node
    ->get('field_reference')->target_id);
  $this
    ->assertSame('10', $node
    ->get('field_reference_2')->target_id);
  $translation = $node
    ->getTranslation('fr');
  $this
    ->assertSame('10', $translation
    ->get('field_reference')->target_id);
  $this
    ->assertSame('10', $translation
    ->get('field_reference_2')->target_id);
}