public function UrlHelperTest::providerTestValidAbsoluteData in Drupal 9
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Component/Utility/UrlHelperTest.php \Drupal\Tests\Component\Utility\UrlHelperTest::providerTestValidAbsoluteData()
Data provider for testValidAbsolute().
Return value
array
File
- core/
tests/ Drupal/ Tests/ Component/ Utility/ UrlHelperTest.php, line 52
Class
- UrlHelperTest
- @group Utility
Namespace
Drupal\Tests\Component\UtilityCode
public function providerTestValidAbsoluteData() {
$urls = [
'example.com',
'www.example.com',
'ex-ample.com',
'3xampl3.com',
'example.com/parenthesis',
'example.com/index.html#pagetop',
'example.com:8080',
'subdomain.example.com',
'example.com/index.php/node',
'example.com/index.php/node?param=false',
'user@www.example.com',
'user:pass@www.example.com:8080/login.php?do=login&style=%23#pagetop',
'127.0.0.1',
'example.org?',
'john%20doe:secret:foo@example.org/',
'example.org/~,$\'*;',
'caf%C3%A9.example.org',
'[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html',
];
return $this
->dataEnhanceWithScheme($urls);
}