You are here

public function UrlBagTest::dataProviderToAbsolute in Mini site 8

Data provider for testToAbsolute.

File

tests/src/Kernel/UrlBagTest.php, line 152

Class

UrlBagTest
Class UrlBagTest.

Namespace

Drupal\Tests\minisite\Kernel

Code

public function dataProviderToAbsolute() {
  return [
    [
      'http://example.com',
      'http://example.com',
      'http://example.com',
    ],
    [
      'http://example.com',
      'http://example.com/page1.html',
      'http://example.com/page1.html',
    ],
    [
      'http://example.com',
      'http://otherdomain.com/page1.html',
      'http://otherdomain.com/page1.html',
    ],
    [
      'http://example.com',
      'page1.html',
      'http://example.com/page1.html',
    ],
    [
      'http://example.com',
      'subpath/page1.html',
      'http://example.com/subpath/page1.html',
    ],
    [
      'http://example.com',
      '/page1.html',
      'http://example.com/page1.html',
    ],
    [
      'http://example.com',
      '/subpath/page1.html',
      'http://example.com/subpath/page1.html',
    ],
  ];
}