// Test the migration of node and user reference fields.
foreach([2, 3]as$revision_id){ $revision = $this->nodeStorage->loadRevision($revision_id); $this->assertCount(1, $revision->field_node_reference); $this->assertSame('5', $revision->field_node_reference->target_id);
// Now load and test each revision, including the field 'field_text_plain'
// which has text reflecting the revision.
$data = $this->expectedRevisionEntityData()[0]; foreach($this->expectedNodeFieldRevisionTable()as$key => $revision){ $this->assertRevision($revision, $data[$key]); }
// Test the order in multi-value fields.
$revision = $this->nodeStorage->loadRevision(21); $this->assertSame([ ['target_id' => '15'], ['target_id' => '16'], ], $revision->get('field_company')->getValue()); }