function PathValidatorTest::testIsValidWithInvalidExternalUrl

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

@legacy-covers ::isValid

File

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

Class

PathValidatorTest
Tests Drupal\Core\Path\PathValidator.

Namespace

Drupal\Tests\Core\Path

Code

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

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