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