Commit db6bd07b authored by alexpott's avatar alexpott
Browse files

Issue #2332709 by swentel, unstatu | dawehner: Fixed Link to add a view mode...

Issue #2332709 by swentel, unstatu | dawehner: Fixed Link to add a view mode of a certain entity type is wrong.
parent 1e95f636
......@@ -114,7 +114,7 @@ public function render() {
$table['#weight'] = -10;
}
$short_type = str_replace('_mode', '', $this->entityTypeId);
$short_type = str_replace(array('entity_', '_mode'), '', $this->entityTypeId);
$table['#rows']['_add_new'][] = array(
'data' => array(
'#type' => 'link',
......
......@@ -35,6 +35,7 @@ public function testEntityViewModeUI() {
$this->assertResponse(200);
$this->assertText(t('Add new view mode'));
$this->assertLinkByHref('admin/structure/display-modes/view/add');
$this->assertLinkByHref('admin/structure/display-modes/view/add/entity_test');
$this->drupalGet('admin/structure/display-modes/view/add/entity_test_mulrev');
$this->assertResponse(404);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment