private function ToolbarAdminMenuTest::getSubtreesHash in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/toolbar/src/Tests/ToolbarAdminMenuTest.php \Drupal\toolbar\Tests\ToolbarAdminMenuTest::getSubtreesHash()
Get the hash value from the admin menu subtrees route path.
Return value
string The hash value from the admin menu subtrees route path.
7 calls to ToolbarAdminMenuTest::getSubtreesHash()
- ToolbarAdminMenuTest::assertDifferentHash in core/
modules/ toolbar/ src/ Tests/ ToolbarAdminMenuTest.php - Asserts the subtrees hash on a fresh page GET is different from the hash from the previous page GET.
- ToolbarAdminMenuTest::setUp in core/
modules/ toolbar/ src/ Tests/ ToolbarAdminMenuTest.php - Sets up a Drupal site for running functional and integration tests.
- ToolbarAdminMenuTest::testLanguageSwitching in core/
modules/ toolbar/ src/ Tests/ ToolbarAdminMenuTest.php - Test that subtrees hashes vary by the language of the page.
- ToolbarAdminMenuTest::testLocaleTranslationSubtreesHashCacheClear in core/
modules/ toolbar/ src/ Tests/ ToolbarAdminMenuTest.php - Tests that toolbar cache is cleared when string translations are made.
- ToolbarAdminMenuTest::testNonCurrentUserAccountUpdates in core/
modules/ toolbar/ src/ Tests/ ToolbarAdminMenuTest.php - Tests that changes to a user account by another user clears the changed account's toolbar cached, not the user's who took the action.
File
- core/
modules/ toolbar/ src/ Tests/ ToolbarAdminMenuTest.php, line 407 - Contains \Drupal\toolbar\Tests\ToolbarAdminMenuTest.
Class
- ToolbarAdminMenuTest
- Tests the caching of the admin menu subtree items.
Namespace
Drupal\toolbar\TestsCode
private function getSubtreesHash() {
$settings = $this
->getDrupalSettings();
// The toolbar module defines a route '/toolbar/subtrees/{hash}' that
// returns JSON for the rendered subtrees. This hash is provided to the
// client in drupalSettings.
return $settings['toolbar']['subtreesHash'];
}