You are here

public function UrlValidatorTest::dataProviderUrlIsIndex in Mini site 8

Data provider for testUrlIsIndex.

File

tests/src/Kernel/UrlValidatorTest.php, line 129

Class

UrlValidatorTest
Class UrlValidatorTest.

Namespace

Drupal\Tests\minisite\Kernel

Code

public function dataProviderUrlIsIndex() {
  return [
    [
      'http://example.com',
      NULL,
      FALSE,
    ],
    [
      'http://www.example.com',
      NULL,
      FALSE,
    ],
    [
      '//example.com',
      NULL,
      FALSE,
    ],
    [
      'example.com',
      NULL,
      FALSE,
    ],
    [
      'page',
      NULL,
      FALSE,
    ],
    [
      '/page',
      NULL,
      FALSE,
    ],
    [
      'sub/page',
      NULL,
      FALSE,
    ],
    [
      '/sub/page',
      NULL,
      FALSE,
    ],
    [
      './page',
      NULL,
      FALSE,
    ],
    [
      './sub/page',
      NULL,
      FALSE,
    ],
    [
      '../sub/page',
      NULL,
      FALSE,
    ],
    [
      '../../sub/page',
      NULL,
      FALSE,
    ],
    [
      'http://example.com/index.html',
      NULL,
      TRUE,
    ],
    [
      '//example.com/index.html',
      NULL,
      TRUE,
    ],
    [
      'index.html',
      NULL,
      TRUE,
    ],
    [
      '/index.html',
      NULL,
      TRUE,
    ],
    [
      'sub/index.html',
      NULL,
      TRUE,
    ],
    [
      '/sub/index.html',
      NULL,
      TRUE,
    ],
    [
      './index.html',
      NULL,
      TRUE,
    ],
    [
      './sub/index.html',
      NULL,
      TRUE,
    ],
    [
      '../sub/index.html',
      NULL,
      TRUE,
    ],
    [
      '../../sub/index.html',
      NULL,
      TRUE,
    ],
    [
      'index2.html',
      'index2.html',
      TRUE,
    ],
  ];
}