public function UrlValidatorTest::dataProviderUrlIsRelative in Mini site 8
Data provider for testUrlIsRelative.
File
- tests/
src/ Kernel/ UrlValidatorTest.php, line 93
Class
- UrlValidatorTest
- Class UrlValidatorTest.
Namespace
Drupal\Tests\minisite\KernelCode
public function dataProviderUrlIsRelative() {
return [
[
'http://example.com',
FALSE,
],
[
'http://www.example.com',
FALSE,
],
[
'//example.com',
FALSE,
],
[
'example.com',
FALSE,
],
[
'page',
FALSE,
],
[
'/page',
FALSE,
],
[
'sub/page',
FALSE,
],
[
'/sub/page',
FALSE,
],
[
'./page',
FALSE,
],
[
'./sub/page',
FALSE,
],
[
'../sub/page',
TRUE,
],
[
'../../sub/page',
TRUE,
],
];
}