You are here

public function UrlHelperTest::testBuildQuery in Drupal 9

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

Tests query building.

@dataProvider providerTestBuildQuery @covers ::buildQuery

Parameters

array $query: The array of query parameters.

string $expected: The expected query string.

string $message: The assertion message.

File

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

Class

UrlHelperTest
@group Utility

Namespace

Drupal\Tests\Component\Utility

Code

public function testBuildQuery($query, $expected, $message) {
  $this
    ->assertEquals(UrlHelper::buildQuery($query), $expected, $message);
}