You are here

public function UrlTest::testFromInvalidInternalUri in Drupal 8

Tests the fromUri() method with an invalid internal: URI.

@covers ::fromUri @dataProvider providerFromInvalidInternalUri

File

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

Class

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

Namespace

Drupal\Tests\Core

Code

public function testFromInvalidInternalUri($path) {
  $this
    ->expectException(\InvalidArgumentException::class);
  Url::fromUri('internal:' . $path);
}