You are here

public function UrlValidatorTest::dataProviderRootToRelative in Mini site 8

Data provider for testRootToRelative.

File

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

Class

UrlValidatorTest
Class UrlValidatorTest.

Namespace

Drupal\Tests\minisite\Kernel

Code

public function dataProviderRootToRelative() {
  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',
    ],
  ];
}