public function testNodeRevision() { $node = \Drupal::
entityTypeManager()->
getStorage('node'
)->
loadRevision(2001
);
/** @var \Drupal\node\NodeInterface $node */
$this->
assertSame('1',
$node->
id());
$this->
assertSame('2001',
$node->
getRevisionId());
$this->
assertSame('und',
$node->langcode->value
);
$this->
assertSame('Test title rev 3',
$node->
getTitle());
$this->
assertSame('body test rev 3',
$node->body->value
);
$this->
assertSame('teaser test rev 3',
$node->body->summary
);
$this->
assertSame('2',
$node->
getRevisionUser()->
id());
$this->
assertSame('modified rev 3',
$node->revision_log->value
);
$this->
assertSame('1420861423',
$node->
getRevisionCreationTime());
$this->
assertRevision(1, 'und', 'Test title', NULL, 1390095702
);
$this->
assertRevision(3, 'und', 'Test title rev 3', NULL, 1420718386
);
$this->
assertRevision(4, 'und', 'Test page title rev 4', NULL, 1390095701
);
$this->
assertRevision(5, 'und', 'Test title rev 2', 'modified rev 2', 1390095703
);
$this->
assertRevision(6, 'und', 'Node 4', NULL, 1390095701
);
$this->
assertRevision(7, 'und', 'Node 5', NULL, 1390095701
);
$this->
assertRevision(8, 'und', 'Node 6', NULL, 1390095701
);
$this->
assertRevision(9, 'und', 'Node 7', NULL, 1390095701
);