3 namespace Drupal\Tests\taxonomy\Kernel\Migrate\d6;
5 use Drupal\Tests\migrate_drupal\Kernel\d6\MigrateDrupal6TestBase;
8 * Upgrade taxonomy term node associations.
10 * @group migrate_drupal_6
12 class MigrateTermNodeRevisionTest extends MigrateDrupal6TestBase {
17 public static $modules = ['taxonomy', 'menu_ui'];
22 protected function setUp() {
24 $this->installSchema('node', ['node_access']);
25 $this->migrateContent(['revisions']);
26 $this->migrateTaxonomy();
27 $this->executeMigrations(['d6_term_node', 'd6_term_node_revision']);
31 * Tests the Drupal 6 term-node revision association to Drupal 8 migration.
33 public function testTermRevisionNode() {
34 $node = \Drupal::entityManager()->getStorage('node')->loadRevision(2001);
35 $this->assertSame(2, count($node->field_vocabulary_3_i_2_));
36 $this->assertSame('4', $node->field_vocabulary_3_i_2_[0]->target_id);
37 $this->assertSame('5', $node->field_vocabulary_3_i_2_[1]->target_id);