Commit d4eb909c authored by alexpott's avatar alexpott

Issue #2934799 by maxocub, Olarin, heddn, dww: d6_term_node_revision migration...

Issue #2934799 by maxocub, Olarin, heddn, dww: d6_term_node_revision migration ignores a lot of items that it shouldn't
parent a878a80d
......@@ -44160,17 +44160,6 @@
'timestamp' => '1420861423',
'format' => '1',
))
->values(array(
'nid' => '1',
'vid' => '2',
'uid' => '2',
'title' => 'Test title rev 2',
'body' => 'body test rev 2',
'teaser' => 'teaser test rev 2',
'log' => 'modified rev 2',
'timestamp' => '1390095702',
'format' => '1',
))
->values(array(
'nid' => '2',
'vid' => '3',
......@@ -44402,6 +44391,17 @@
'timestamp' => '1520613305',
'format' => '1',
))
->values(array(
'nid' => '1',
'vid' => '2001',
'uid' => '2',
'title' => 'Test title rev 2',
'body' => 'body test rev 2',
'teaser' => 'teaser test rev 2',
'log' => 'modified rev 2',
'timestamp' => '1390095702',
'format' => '1',
))
->execute();
$connection->schema()->createTable('node_type', array(
......@@ -46835,12 +46835,12 @@
))
->values(array(
'nid' => '1',
'vid' => '2',
'vid' => '2001',
'tid' => '4',
))
->values(array(
'nid' => '1',
'vid' => '2',
'vid' => '2001',
'tid' => '5',
))
->values(array(
......@@ -28,10 +28,10 @@ protected function setUp() {
* Test node revisions migration from Drupal 6 to 8.
*/
public function testNodeRevision() {
$node = \Drupal::entityManager()->getStorage('node')->loadRevision(2);
$node = \Drupal::entityManager()->getStorage('node')->loadRevision(2001);
/** @var \Drupal\node\NodeInterface $node */
$this->assertIdentical('1', $node->id());
$this->assertIdentical('2', $node->getRevisionId());
$this->assertIdentical('2001', $node->getRevisionId());
$this->assertIdentical('und', $node->langcode->value);
$this->assertIdentical('Test title rev 2', $node->getTitle());
$this->assertIdentical('body test rev 2', $node->body->value);
......
......@@ -11,7 +11,7 @@ process:
vid:
-
plugin: migration_lookup
migration: d6_node
migration: d6_node_revision
source: vid
-
plugin: skip_on_empty
......
......@@ -31,7 +31,7 @@ protected function setUp() {
* Tests the Drupal 6 term-node revision association to Drupal 8 migration.
*/
public function testTermRevisionNode() {
$node = \Drupal::entityManager()->getStorage('node')->loadRevision(2);
$node = \Drupal::entityManager()->getStorage('node')->loadRevision(2001);
$this->assertSame(2, count($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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment