Commit ea37327b authored by webchick's avatar webchick

Issue #2498689 by lauriii, Wim Leers, David_Rothstein: "Back to site" link no...

Issue #2498689 by lauriii, Wim Leers, David_Rothstein: "Back to site" link no longer appears in the toolbar
parent 3f56e7f1
......@@ -483,6 +483,16 @@ function testLanguageSwitching() {
$this->assertNotEqual($this->hash, $new_subtree_hash, 'The user-specific subtree menu hash has been updated.');
}
/**
* Test that back to site link exists on admin pages, not on content pages.
*/
public function testBackToSiteLink() {
// Back to site link should exist in the markup.
$this->drupalGet('test-page');
$back_link = $this->cssSelect('.home-toolbar-tab');
$this->assertTrue($back_link);
}
/**
* Get the hash value from the admin menu subtrees route path.
*
......
......@@ -102,7 +102,7 @@ function template_preprocess_toolbar(&$variables) {
}
// Add the tab.
if (isset($element[$key]['tray'])) {
if (isset($element[$key]['tab'])) {
$attributes = array();
// Pass the wrapper attributes along.
if (array_key_exists('#wrapper_attributes', $element[$key])) {
......
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