You are here

public function WebTestBaseTest::providerTestGetAbsoluteUrl in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/simpletest/tests/src/Unit/WebTestBaseTest.php \Drupal\Tests\simpletest\Unit\WebTestBaseTest::providerTestGetAbsoluteUrl()

Provides test data for testGetAbsoluteUrl.

Return value

array

File

core/modules/simpletest/tests/src/Unit/WebTestBaseTest.php, line 229
Contains \Drupal\Tests\simpletest\Unit\WebTestBaseTest.

Class

WebTestBaseTest
@coversDefaultClass \Drupal\simpletest\WebTestBase @group simpletest

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;
}