Issue #2187991 by jessebeach, dawehner: Toolbar access checking points to wrong namespace.

8.0.x
webchick 2014-02-04 09:19:41 -08:00
parent 0d70b8be2c
commit 4fe6358e4c
2 changed files with 14 additions and 1 deletions

View File

@ -440,6 +440,19 @@ class ToolbarAdminMenuTest extends WebTestBase {
$this->assertNotEqual($original_subtree_hash, $new_subtree_hash, 'The user-specific subtree menu hash has been updated.');
}
/**
* Tests that the 'toolbar/subtrees/{hash}' is reachable.
*/
function testSubtreesJsonRequest() {
$admin_user = $this->admin_user;
$this->drupalLogin($admin_user);
// Request a new page to refresh the drupalSettings object.
$subtrees_hash = $this->getSubtreesHash();
$this->drupalGetJSON('toolbar/subtrees/' . $subtrees_hash);
$this->assertResponse('200');
}
/**
* Get the hash value from the admin menu subtrees route path.
*

View File

@ -3,4 +3,4 @@ toolbar.subtrees:
defaults:
_controller: '\Drupal\toolbar\Controller\ToolbarController::subtreesJsonp'
requirements:
_custom_access: '\Drupal\toolbar\Routing\ToolbarController::checkSubTreeAccess'
_custom_access: '\Drupal\toolbar\Controller\ToolbarController::checkSubTreeAccess'