$entity->name = 'bar';
$entity->
save();
// Sync a change to the 'name' on the original revision ID.
$original_revision =
$storage->
loadRevision($original_revision_id);
$original_revision->
setSyncing(TRUE
);
$original_revision->name = 'baz';
$original_revision->
save();
// The names of each revision should reflect two revisions, the original one
// having been updated during a sync.
$this->
assertEquals(['baz', 'bar'
],
$this->
getAllRevisionNames($entity));
} /**
* Tests a moderation state changed on a previous revision during a sync.
*/
public function testStateChangedPreviousRevisionDuringSync() { $storage =
$this->container->
get('entity_type.manager'
)->
getStorage('entity_test_mulrevpub'
);
$entity = EntityTestMulRevPub::
create([ 'moderation_state' => 'published',
'name' => 'foo',
]);