function RequestSanitizerTest::providerTestSanitizedDestinations

Same name and namespace in other branches
  1. 9 core/tests/Drupal/Tests/Core/Security/RequestSanitizerTest.php \Drupal\Tests\Core\Security\RequestSanitizerTest::providerTestSanitizedDestinations()
  2. 8.9.x core/tests/Drupal/Tests/Core/Security/RequestSanitizerTest.php \Drupal\Tests\Core\Security\RequestSanitizerTest::providerTestSanitizedDestinations()
  3. 11.x core/tests/Drupal/Tests/Core/Security/RequestSanitizerTest.php \Drupal\Tests\Core\Security\RequestSanitizerTest::providerTestSanitizedDestinations()

Data provider for testing sanitized destinations.

File

core/tests/Drupal/Tests/Core/Security/RequestSanitizerTest.php, line 334

Class

RequestSanitizerTest
Tests RequestSanitizer class.

Namespace

Drupal\Tests\Core\Security

Code

public static function providerTestSanitizedDestinations() {
  $data = [];
  // External URL without scheme is not allowed.
  $data[] = [
    '//example.com/test',
  ];
  // External URL is not allowed.
  $data[] = [
    'http://example.com',
  ];
  return $data;
}

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