function ActiveLinkTest::testQueryStringQuotes

Same name and namespace in other branches
  1. 11.x core/modules/system/tests/src/FunctionalJavascript/ActiveLinkTest.php \Drupal\Tests\system\FunctionalJavascript\ActiveLinkTest::testQueryStringQuotes()

Ensures no JS error is thrown with query strings containing special chars.

File

core/modules/system/tests/src/FunctionalJavascript/ActiveLinkTest.php, line 28

Class

ActiveLinkTest
Tests active link JS behavior.

Namespace

Drupal\Tests\system\FunctionalJavascript

Code

public function testQueryStringQuotes() : void {
  $user = $this->createUser();
  $this->drupalLogin($user);
  $this->drupalGet($this->getSession()
    ->getCurrentUrl(), [
    'query' => [
      'foo' => "\"'[](){}*+~>|\\/:;,.!@#\$%^&-_=?<>",
    ],
  ]);
  $this->failOnJavaScriptErrors();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.