diff --git a/core/lib/Drupal/Core/Entity/ContentEntityBase.php b/core/lib/Drupal/Core/Entity/ContentEntityBase.php index 274e6f9..ba3aae9 100644 --- a/core/lib/Drupal/Core/Entity/ContentEntityBase.php +++ b/core/lib/Drupal/Core/Entity/ContentEntityBase.php @@ -303,7 +303,7 @@ public function getOriginalRevisionId() { /** * {@inheritdoc} */ - public function resetOriginalRevisionId() { + public function setOriginalRevisionId() { $this->originalRevisionId = $this->getRevisionId(); return $this; } diff --git a/core/lib/Drupal/Core/Entity/ContentEntityInterface.php b/core/lib/Drupal/Core/Entity/ContentEntityInterface.php index 5cfa905..6646e04 100644 --- a/core/lib/Drupal/Core/Entity/ContentEntityInterface.php +++ b/core/lib/Drupal/Core/Entity/ContentEntityInterface.php @@ -67,6 +67,6 @@ public function getOriginalRevisionId(); * * @return $this */ - public function resetOriginalRevisionId(); + public function setOriginalRevisionId(); } diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityOriginalRevisionTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityOriginalRevisionTest.php index 4c48646..3eff47f 100644 --- a/core/tests/Drupal/KernelTests/Core/Entity/EntityOriginalRevisionTest.php +++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityOriginalRevisionTest.php @@ -49,15 +49,15 @@ public function testOriginalRevisionId() { $loaded->setNewRevision(TRUE); // Before saving, the original revision ID should be the same as the created - // entity, not the same as the loaded entity (which do not have a revision - // id yet). + // entity, not the same as the loaded entity (which does not have a revision + // ID yet). $this->assertEquals($entity->getRevisionId(), $loaded->getOriginalRevisionId()); $this->assertNotEquals($loaded->getRevisionId(), $loaded->getOriginalRevisionId()); $this->assertSame(NULL, $loaded->getRevisionId()); $loaded->save(); - // In entity_test_entity_update() the original revision id was stored in + // In entity_test_entity_update() the original revision ID was stored in // state. This should be the same as we had before calling $loaded->save(). /** @var \Drupal\Core\Entity\ContentEntityInterface $loaded_original */ $originalRevisionId = \Drupal::state()->get('entity_test.originalRevisionId'); @@ -80,7 +80,7 @@ public function testOriginalRevisionId() { $loaded->save(); // After saving, the original revision id set in entity_test_entity_update() - // and returned from the entity should be the same and the entity's revision + // and returned from the entity should be the same as the entity's revision // id because a new revision wasn't created, the existing revision was // updated. $originalRevisionId2 = \Drupal::state()->get('entity_test.originalRevisionId');