function ToolbarAdminMenuTest::getSubtreesHash
Same name in other branches
- 9 core/modules/toolbar/tests/src/Functional/ToolbarAdminMenuTest.php \Drupal\Tests\toolbar\Functional\ToolbarAdminMenuTest::getSubtreesHash()
- 8.9.x core/modules/toolbar/tests/src/Functional/ToolbarAdminMenuTest.php \Drupal\Tests\toolbar\Functional\ToolbarAdminMenuTest::getSubtreesHash()
- 11.x core/modules/toolbar/tests/src/Functional/ToolbarAdminMenuTest.php \Drupal\Tests\toolbar\Functional\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/ tests/ src/ Functional/ ToolbarAdminMenuTest.php - Checks the subtree hash of the current page with that of the previous page.
- ToolbarAdminMenuTest::setUp in core/
modules/ toolbar/ tests/ src/ Functional/ ToolbarAdminMenuTest.php - ToolbarAdminMenuTest::testLanguageSwitching in core/
modules/ toolbar/ tests/ src/ Functional/ ToolbarAdminMenuTest.php - Tests that subtrees hashes vary by the language of the page.
- ToolbarAdminMenuTest::testLocaleTranslationSubtreesHashCacheClear in core/
modules/ toolbar/ tests/ src/ Functional/ ToolbarAdminMenuTest.php - Tests that toolbar cache is cleared when string translations are made.
- ToolbarAdminMenuTest::testNonCurrentUserAccountUpdates in core/
modules/ toolbar/ tests/ src/ Functional/ ToolbarAdminMenuTest.php - Tests cache invalidation when one user modifies another user.
File
-
core/
modules/ toolbar/ tests/ src/ Functional/ ToolbarAdminMenuTest.php, line 456
Class
- ToolbarAdminMenuTest
- Tests the caching of the admin menu subtree items.
Namespace
Drupal\Tests\toolbar\FunctionalCode
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'];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.