You are here

public function PathValidatorTest::testIsValidWithInvalidExternalUrl in Drupal 9

Same name and namespace in other branches
  1. 8 core/tests/Drupal/Tests/Core/Path/PathValidatorTest.php \Drupal\Tests\Core\Path\PathValidatorTest::testIsValidWithInvalidExternalUrl()

Tests the isValid() method with an invalid external URL.

@covers ::isValid

File

core/tests/Drupal/Tests/Core/Path/PathValidatorTest.php, line 108

Class

PathValidatorTest
@coversDefaultClass \Drupal\Core\Path\PathValidator @group Routing

Namespace

Drupal\Tests\Core\Path

Code

public function testIsValidWithInvalidExternalUrl() {
  $this->accessAwareRouter
    ->expects($this
    ->never())
    ->method('match');
  $this
    ->assertFalse($this->pathValidator
    ->isValid('http://'));
}