function WebTestBaseTest::providerTestGetAbsoluteUrl

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

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.