You are here

public function UrlTest::testToUriStringForEntity 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::testToUriStringForEntity()

Tests the toUriString() method with entity: URIs.

@covers ::toUriString

@dataProvider providerTestToUriStringForEntity

File

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

Class

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

Namespace

Drupal\Tests\Core

Code

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