function UrlTest::testFromInvalidUserInput

Tests the fromUserInput method with invalid paths.

@legacy-covers ::fromUserInput

Attributes

#[DataProvider('providerFromInvalidInternalUri')]

File

core/tests/Drupal/Tests/Core/UrlTest.php, line 198

Class

UrlTest
Tests Drupal\Core\Url.

Namespace

Drupal\Tests\Core

Code

public function testFromInvalidUserInput($path) : void {
  $this->expectException(\InvalidArgumentException::class);
  Url::fromUserInput($path);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.