You are here

public function UrlTest::testGetRouteParametersWithExternalUrl in Drupal 8

Tests the getRouteParameters() with an external URL.

@covers ::getRouteParameters

File

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

Class

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

Namespace

Drupal\Tests\Core

Code

public function testGetRouteParametersWithExternalUrl() {
  $url = Url::fromUri('http://example.com');
  $this
    ->expectException(\UnexpectedValueException::class);
  $url
    ->getRouteParameters();
}