function PathValidatorTest::testIsValidWithExternalUrl

Same name in other branches
  1. 9 core/tests/Drupal/Tests/Core/Path/PathValidatorTest.php \Drupal\Tests\Core\Path\PathValidatorTest::testIsValidWithExternalUrl()
  2. 8.9.x core/tests/Drupal/Tests/Core/Path/PathValidatorTest.php \Drupal\Tests\Core\Path\PathValidatorTest::testIsValidWithExternalUrl()
  3. 11.x core/tests/Drupal/Tests/Core/Path/PathValidatorTest.php \Drupal\Tests\Core\Path\PathValidatorTest::testIsValidWithExternalUrl()

Tests the isValid() method for an external URL.

@covers ::isValid

File

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

Class

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

Namespace

Drupal\Tests\Core\Path

Code

public function testIsValidWithExternalUrl() : void {
    $this->accessAwareRouter
        ->expects($this->never())
        ->method('match');
    $this->assertTrue($this->pathValidator
        ->isValid('https://www.drupal.org'));
}

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