diff --git a/core/modules/system/src/Tests/Entity/EntityRevisionsTest.php b/core/modules/system/src/Tests/Entity/EntityRevisionsTest.php index 28f46ef..310502e 100644 --- a/core/modules/system/src/Tests/Entity/EntityRevisionsTest.php +++ b/core/modules/system/src/Tests/Entity/EntityRevisionsTest.php @@ -131,6 +131,7 @@ public function testEntityRevisionParamConverter() { $entity->addTranslation('de', ['name' => 'default revision - de']); $entity->save(); + /** @var \Drupal\Core\Entity\ContentEntityInterface $forward_revision */ $forward_revision = \Drupal::entityTypeManager()->getStorage('entity_test_mulrev')->loadUnchanged($entity->id()); $forward_revision->setNewRevision(); @@ -144,13 +145,11 @@ public function testEntityRevisionParamConverter() { $forward_revision_translation->save(); // Check that the entity revision is upcasted in the correct language. - $revision_url = 'entity_test_mulrev/' . $entity->id() . '/revision/' . $forward_revision->getRevisionId() . '/view'; - - $this->drupalGet($revision_url); + $this->drupalGet($forward_revision->toUrl('revision')); $this->assertText('forward revision - en'); $this->assertNoText('forward revision - de'); - $this->drupalGet('de/' . $revision_url); + $this->drupalGet($forward_revision->getTranslation('de')->toUrl('revision')); $this->assertText('forward revision - de'); $this->assertNoText('forward revision - en'); }