/**
* Test all revisions appear, in order of revision creation.
*/
public function testOrder(): void
{ /** @var \Drupal\entity_test_revlog\Entity\EntityTestWithRevisionLog $entity */
$entity = EntityTestWithRevisionLog::
create(['type' => 'entity_test_revlog'
]);
// Need label to be able to assert order.
$entity->
setName('view all revisions'
);
$user =
$this->
drupalCreateUser([], 'first revision'
);
$entity->
setRevisionUser($user);
$entity->
setNewRevision();
$entity->
save();
$entity->
setNewRevision();
$user =
$this->
drupalCreateUser([], 'second revision'
);
$entity->
setRevisionUser($user);
$entity->
save();
$entity->
setNewRevision();
$user =
$this->
drupalCreateUser([], 'third revision'
);
$entity->
setRevisionUser($user);