public function UrlTest::testFromInvalidUserInput in Drupal 8
Tests the fromUserInput method with invalid paths.
@covers ::fromUserInput @dataProvider providerFromInvalidInternalUri
File
- core/
tests/ Drupal/ Tests/ Core/ UrlTest.php, line 220 - Contains \Drupal\Tests\Core\UrlTest.
Class
- UrlTest
- @coversDefaultClass \Drupal\Core\Url @group UrlTest
Namespace
Drupal\Tests\CoreCode
public function testFromInvalidUserInput($path) {
$this
->expectException(\InvalidArgumentException::class);
$url = Url::fromUserInput($path);
}