$this->node->
setTitle('revised_dummy_title'
);
$this->node->
save();
$this->node2 = Node::
create([ 'type' => 'dummy',
'title' => 'Another test node',
'uid' =>
$this->user->
id(),
]);
$this->node2->
save();
$entity_type_manager = \Drupal::
entityTypeManager();
$version_negotiator =
new VersionNegotiator();
$version_negotiator->
addVersionNegotiator(new VersionById($entity_type_manager), 'id'
);
$version_negotiator->
addVersionNegotiator(new VersionByRel($entity_type_manager), 'rel'
);
$this->versionNegotiator =
$version_negotiator;
} /**
* @covers \Drupal\jsonapi\Revisions\VersionById::getRevision
*/
public function testOldRevision() { $revision =
$this->versionNegotiator->
getRevision($this->node, 'id:' .
$this->nodePreviousRevisionId
);