You are here

public function UrlHelperTest::testParse in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/tests/Drupal/Tests/Component/Utility/UrlHelperTest.php \Drupal\Tests\Component\Utility\UrlHelperTest::testParse()

Tests url parsing.

@dataProvider providerTestParse @covers ::parse

Parameters

string $url: URL to test.

array $expected: Associative array with expected parameters.

File

core/tests/Drupal/Tests/Component/Utility/UrlHelperTest.php, line 247
Contains \Drupal\Tests\Component\Utility\UrlHelperTest.

Class

UrlHelperTest
@group Utility

Namespace

Drupal\Tests\Component\Utility

Code

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