public function UrlHelperTest::providerTestExternalIsLocalInvalid in Drupal 9
Same name and namespace in other branches
- 8 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 630
Class
- UrlHelperTest
- @group Utility
Namespace
Drupal\Tests\Component\UtilityCode
public 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',
],
];
}