comparison core/modules/migrate/tests/src/Kernel/MigrateRollbackTest.php @ 12:7a779792577d

Update Drupal core to v8.4.5 (via Composer)
author Chris Cannam
date Fri, 23 Feb 2018 15:52:07 +0000
parents 4c8ae668cc8c
children
comparison
equal deleted inserted replaced
11:bfffd8d7479a 12:7a779792577d
67 67
68 // Import and validate vocabulary config entities were created. 68 // Import and validate vocabulary config entities were created.
69 $vocabulary_executable = new MigrateExecutable($vocabulary_migration, $this); 69 $vocabulary_executable = new MigrateExecutable($vocabulary_migration, $this);
70 $vocabulary_executable->import(); 70 $vocabulary_executable->import();
71 foreach ($vocabulary_data_rows as $row) { 71 foreach ($vocabulary_data_rows as $row) {
72 /** @var Vocabulary $vocabulary */ 72 /** @var \Drupal\taxonomy\Entity\Vocabulary $vocabulary */
73 $vocabulary = Vocabulary::load($row['id']); 73 $vocabulary = Vocabulary::load($row['id']);
74 $this->assertTrue($vocabulary); 74 $this->assertTrue($vocabulary);
75 $map_row = $vocabulary_id_map->getRowBySource(['id' => $row['id']]); 75 $map_row = $vocabulary_id_map->getRowBySource(['id' => $row['id']]);
76 $this->assertNotNull($map_row['destid1']); 76 $this->assertNotNull($map_row['destid1']);
77 } 77 }
120 $dummy_row = new Row(['id' => 2], $ids); 120 $dummy_row = new Row(['id' => 2], $ids);
121 $term_id_map->saveIdMapping($dummy_row, [$map_row['destid1']], 121 $term_id_map->saveIdMapping($dummy_row, [$map_row['destid1']],
122 $map_row['source_row_status'], MigrateIdMapInterface::ROLLBACK_PRESERVE); 122 $map_row['source_row_status'], MigrateIdMapInterface::ROLLBACK_PRESERVE);
123 123
124 foreach ($term_data_rows as $row) { 124 foreach ($term_data_rows as $row) {
125 /** @var Term $term */ 125 /** @var \Drupal\taxonomy\Entity\Term $term */
126 $term = Term::load($row['id']); 126 $term = Term::load($row['id']);
127 $this->assertTrue($term); 127 $this->assertTrue($term);
128 $map_row = $term_id_map->getRowBySource(['id' => $row['id']]); 128 $map_row = $term_id_map->getRowBySource(['id' => $row['id']]);
129 $this->assertNotNull($map_row['destid1']); 129 $this->assertNotNull($map_row['destid1']);
130 } 130 }