You are here

public function UrlTest::testFromRouteUriWithMissingRouteName in Drupal 8

@covers ::fromUri

File

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

Class

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

Namespace

Drupal\Tests\Core

Code

public function testFromRouteUriWithMissingRouteName() {
  $this
    ->expectException(\InvalidArgumentException::class);
  $this
    ->expectExceptionMessage("The route URI 'route:' is invalid.");
  Url::fromUri('route:');
}