Issue #2187991 by jessebeach, dawehner: Toolbar access checking points to wrong namespace.
parent
0d70b8be2c
commit
4fe6358e4c
|
@ -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.
|
||||
*
|
||||
|
|
|
@ -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'
|
||||
|
|
Loading…
Reference in New Issue