class ActiveLinkTest

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

Tests active link JS behavior.

Attributes

#[Group('system')] #[RunTestsInSeparateProcesses]

Hierarchy

Expanded class hierarchy of ActiveLinkTest

See also

Drupal.behaviors.activeLinks

File

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

Namespace

Drupal\Tests\system\FunctionalJavascript
View source
class ActiveLinkTest extends WebDriverTestBase {
  
  /**
   * {@inheritdoc}
   */
  protected $defaultTheme = 'stark';
  
  /**
   * Ensures no JS error is thrown with query strings containing special chars.
   */
  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.