You are here

public function UrlTest::testToUriStringForRoute in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/tests/Drupal/Tests/Core/UrlTest.php \Drupal\Tests\Core\UrlTest::testToUriStringForRoute()

Tests the toUriString() method with route: URIs.

@covers ::toUriString

@dataProvider providerTestToUriStringForRoute

File

core/tests/Drupal/Tests/Core/UrlTest.php, line 758
Contains \Drupal\Tests\Core\UrlTest.

Class

UrlTest
@coversDefaultClass \Drupal\Core\Url @group UrlTest

Namespace

Drupal\Tests\Core

Code

public function testToUriStringForRoute($uri, $options, $uri_string) {
  $url = Url::fromUri($uri, $options);
  $this
    ->assertSame($url
    ->toUriString(), $uri_string);
}