Chris@17: drupalLogin($this->drupalCreateUser()); Chris@17: $this->drupalGet('test-page'); Chris@17: Chris@17: // Check that we can read the JS settings. Chris@17: $js_settings = $this->getDrupalSettings(); Chris@17: $this->assertSame('azAZ09();.,\\\/-_{}', $js_settings['test-setting']); Chris@17: Chris@17: // Dynamically change the setting using Javascript. Chris@17: $script = <<getSession()->evaluateScript($script); Chris@17: Chris@17: // Check that the setting has been changed. Chris@17: $js_settings = $this->getDrupalSettings(); Chris@17: $this->assertSame('foo', $js_settings['test-setting']); Chris@17: } Chris@17: Chris@17: }