Skip to content
Snippets Groups Projects
Commit 881f388c authored by git's avatar git Committed by Daniel Wehner
Browse files

Issue #2709489 by CTaPByK, slashrsm: RevisionsOverviewDeriver uses wrong base_route

parent 135c739d
No related branches found
No related tags found
No related merge requests found
......@@ -61,7 +61,7 @@ class RevisionsOverviewDeriver extends DeriverBase implements ContainerDeriverIn
$this->derivatives[$entity_type_id] = [
'route_name' => "entity.$entity_type_id.version_history",
'title' => 'Revisions',
'base_route' => "entity.$entity_type_id.edit_form",
'base_route' => "entity.$entity_type_id.canonical",
'weight' => 20,
] + $base_plugin_definition;
}
......
entity.entity_module_test.canonical:
entity.entity_test_enhanced.canonical:
title: View
route_name: entity.entity_module_test.canonical
base_route: entity.entity_module_test.canonical
route_name: entity.entity_test_enhanced.canonical
base_route: entity.entity_test_enhanced.canonical
entity.entity_module_test.edit_form:
title: Edit
route_name: entity.entity_module_test.edit_form
base_route: entity.entity_module_test.canonical
route_name: entity.entity_test_enhanced.edit_form
base_route: entity.entity_test_enhanced.canonical
......@@ -82,6 +82,9 @@ class RevisionRouteAccessTest extends BrowserTestBase {
$edit_link = $this->getSession()->getPage()->findLink('Edit');
$edit_link->click();
$this->assertSession()->addressEquals('/entity_test_enhanced/1/edit');
// Check if we have revision tab link on edit page.
$this->getSession()->getPage()->findLink('Revisions')->click();
$this->assertSession()->addressEquals('/entity_test_enhanced/1/revisions');
$this->drupalGet('/entity_test_enhanced/1/revisions/2/view');
$this->assertSession()->statusCodeEquals(200);
$this->assertSession()->responseContains('rev 2');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment