public static function UrlHelperTest::providerTestFilterBadProtocol in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/tests/Drupal/Tests/Component/Utility/UrlHelperTest.php \Drupal\Tests\Component\Utility\UrlHelperTest::providerTestFilterBadProtocol()
Provides data for self::testTestFilterBadProtocol().
Return value
array
File
- core/
tests/ Drupal/ Tests/ Component/ Utility/ UrlHelperTest.php, line 394 - Contains \Drupal\Tests\Component\Utility\UrlHelperTest.
Class
- UrlHelperTest
- @group Utility
Namespace
Drupal\Tests\Component\UtilityCode
public static function providerTestFilterBadProtocol() {
return array(
array(
'javascript://example.com?foo&bar',
'//example.com?foo&bar',
array(
'http',
'https',
),
),
// Test custom protocols.
array(
'http://example.com?foo&bar',
'//example.com?foo&bar',
array(
'https',
),
),
// Valid protocol.
array(
'http://example.com?foo&bar',
'http://example.com?foo&bar',
array(
'https',
'http',
),
),
// Colon not part of the URL scheme.
array(
'/test:8888?foo&bar',
'/test:8888?foo&bar',
array(
'http',
),
),
);
}