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