function UrlHelperTest::testIsExternal
Same name in other branches
- 9 core/tests/Drupal/Tests/Component/Utility/UrlHelperTest.php \Drupal\Tests\Component\Utility\UrlHelperTest::testIsExternal()
- 8.9.x core/tests/Drupal/Tests/Component/Utility/UrlHelperTest.php \Drupal\Tests\Component\Utility\UrlHelperTest::testIsExternal()
- 11.x core/tests/Drupal/Tests/Component/Utility/UrlHelperTest.php \Drupal\Tests\Component\Utility\UrlHelperTest::testIsExternal()
Tests external versus internal paths.
@dataProvider providerTestIsExternal @covers ::isExternal
Parameters
string $path: URL or path to test.
bool $expected: Expected result.
File
-
core/
tests/ Drupal/ Tests/ Component/ Utility/ UrlHelperTest.php, line 421
Class
- UrlHelperTest
- @group Utility
Namespace
Drupal\Tests\Component\UtilityCode
public function testIsExternal($path, $expected) : void {
$isExternal = UrlHelper::isExternal($path);
$this->assertEquals($expected, $isExternal);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.