You are here

public function MigrateTermNodeComplete::testTermNodeRevision in Drupal 8

Tests the Drupal 6 term-node association to Drupal 8 node revisions.

File

core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTermNodeComplete.php, line 70

Class

MigrateTermNodeComplete
Upgrade taxonomy term node associations.

Namespace

Drupal\Tests\taxonomy\Kernel\Migrate\d6

Code

public function testTermNodeRevision() {
  $this
    ->executeMigrations([
    'd6_term_node_revision',
  ]);
  $node = \Drupal::entityTypeManager()
    ->getStorage('node')
    ->loadRevision(2001);
  $this
    ->assertCount(2, $node->field_vocabulary_3_i_2_);
  $this
    ->assertSame('4', $node->field_vocabulary_3_i_2_[0]->target_id);
  $this
    ->assertSame('5', $node->field_vocabulary_3_i_2_[1]->target_id);
}