You are here

public function UrlValidatorTest::dataProviderRelativeToRoot in Mini site 8

Data provider for testRelativeToRoot.

File

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

Class

UrlValidatorTest
Class UrlValidatorTest.

Namespace

Drupal\Tests\minisite\Kernel

Code

public function dataProviderRelativeToRoot() {
  return [
    [
      'http://example.com/file',
      NULL,
      'http://example.com/file',
    ],
    [
      'file',
      NULL,
      '/file',
    ],
    [
      '/file',
      NULL,
      '/file',
    ],
    [
      './file',
      NULL,
      '/file',
    ],
    [
      './file',
      'prefix',
      '/prefix/file',
    ],
    [
      '/file',
      'prefix',
      '/prefix/file',
    ],
    [
      '/file',
      '/prefix',
      '/prefix/file',
    ],
    [
      './file',
      'prefix/sub',
      '/prefix/sub/file',
    ],
    [
      '/file',
      'prefix/sub',
      '/prefix/sub/file',
    ],
    [
      '/file',
      '/prefix/sub',
      '/prefix/sub/file',
    ],
    [
      '../file',
      NULL,
      '/file',
    ],
    [
      '../../file',
      NULL,
      '/file',
    ],
    [
      '../../../file',
      NULL,
      '/file',
    ],
    [
      '../file',
      'prefix',
      '/prefix/file',
    ],
    [
      '../../file',
      'prefix',
      '/prefix/file',
    ],
    [
      '../../../file',
      'prefix',
      '/prefix/file',
    ],
    [
      '../../../file',
      '/prefix',
      '/prefix/file',
    ],
    [
      '../../../file',
      'prefix/sub/',
      '/prefix/sub/file',
    ],
  ];
}