You are here

public function WebTestBaseTest::providerTestGetAbsoluteUrl in Drupal 8

Provides test data for testGetAbsoluteUrl.

Return value

array

File

core/modules/simpletest/tests/src/Unit/WebTestBaseTest.php, line 226

Class

WebTestBaseTest
@requires extension curl @coversDefaultClass \Drupal\simpletest\WebTestBase @group simpletest @group WebTestBase

Namespace

Drupal\Tests\simpletest\Unit

Code

public function providerTestGetAbsoluteUrl() {
  $data = [];
  $data['host'] = [
    'http://example.com/drupal/test-example',
    'http://example.com/drupal/test-example',
  ];
  $data['path'] = [
    '/drupal/test-example',
    'http://example.com/drupal/test-example',
  ];
  $data['path-with-query'] = [
    '/drupal/test-example?foo=bar',
    'http://example.com/drupal/test-example?foo=bar',
  ];
  $data['just-query'] = [
    '?foo=bar',
    'http://example.com/drupal/current-path?foo=bar',
  ];
  return $data;
}