getSubtreesHash example

$this->adminUser2 = $this->drupalCreateUser($perms);

    $this->drupalLogin($this->adminUser);

    $this->drupalGet('test-page');
    $this->assertSession()->statusCodeEquals(200);

    // Assert that the toolbar is present in the HTML.     $this->assertSession()->responseContains('id="toolbar-administration"');

    // Store the adminUser admin menu subtrees hash for comparison later.     $this->hash = $this->getSubtreesHash();
  }

  /** * Tests Toolbar's responses to installing and uninstalling modules. * * @see toolbar_modules_installed() * @see toolbar_modules_uninstalled() */
  public function testModuleStatusChangeSubtreesHashCacheClear() {
    // Use an admin role to ensure the user has all available permissions. This     // results in the admin menu links changing as the taxonomy module is
Home | Imprint | This part of the site doesn't use cookies.