function UrlHelperTest::testParse

Tests URL parsing.

@legacy-covers ::parse

Attributes

#[DataProvider('providerTestParse')]

Parameters

string $url: URL to test.

array $expected: Associative array with expected parameters.

File

core/tests/Drupal/Tests/Component/Utility/UrlHelperTest.php, line 283

Class

UrlHelperTest
Tests Drupal\Component\Utility\UrlHelper.

Namespace

Drupal\Tests\Component\Utility

Code

public function testParse($url, $expected) : void {
  $parsed = UrlHelper::parse($url);
  $this->assertEquals($expected, $parsed, 'The URL was not properly parsed.');
}

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