function UrlHelperTest::providerTestExternalIsLocalInvalid
Same name in other branches
- 9 core/tests/Drupal/Tests/Component/Utility/UrlHelperTest.php \Drupal\Tests\Component\Utility\UrlHelperTest::providerTestExternalIsLocalInvalid()
- 8.9.x core/tests/Drupal/Tests/Component/Utility/UrlHelperTest.php \Drupal\Tests\Component\Utility\UrlHelperTest::providerTestExternalIsLocalInvalid()
- 11.x core/tests/Drupal/Tests/Component/Utility/UrlHelperTest.php \Drupal\Tests\Component\Utility\UrlHelperTest::providerTestExternalIsLocalInvalid()
Provides invalid argument data for local external URL detection.
See also
\Drupal\Tests\Component\Utility\UrlHelperTest::testExternalIsLocalInvalid()
File
-
core/
tests/ Drupal/ Tests/ Component/ Utility/ UrlHelperTest.php, line 663
Class
- UrlHelperTest
- @group Utility
Namespace
Drupal\Tests\Component\UtilityCode
public static function providerTestExternalIsLocalInvalid() {
return [
[
'http://example.com/foo',
'',
],
[
'http://example.com/foo',
'bar',
],
[
'http://example.com/foo',
'http://',
],
// Invalid destination URLs.
[
'',
'http://example.com/foo',
],
[
'bar',
'http://example.com/foo',
],
[
'/bar',
'http://example.com/foo',
],
[
'bar/',
'http://example.com/foo',
],
[
'http://',
'http://example.com/foo',
],
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.