You are here

protected function Upgrade6Test::assertFollowUpMigrationResults in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/migrate_drupal_ui/tests/src/Functional/d6/Upgrade6Test.php \Drupal\Tests\migrate_drupal_ui\Functional\d6\Upgrade6Test::assertFollowUpMigrationResults()
  2. 9 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.

@internal

File

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

Class

Upgrade6Test
Tests Drupal 6 upgrade using the migrate UI.

Namespace

Drupal\Tests\migrate_drupal_ui\Functional\d6

Code

protected function assertFollowUpMigrationResults() : void {
  $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);
}