function UrlHelperTest::testExternalIsLocalInvalid
Same name in other branches
- 8.9.x core/tests/Drupal/Tests/Component/Utility/UrlHelperTest.php \Drupal\Tests\Component\Utility\UrlHelperTest::testExternalIsLocalInvalid()
- 10 core/tests/Drupal/Tests/Component/Utility/UrlHelperTest.php \Drupal\Tests\Component\Utility\UrlHelperTest::testExternalIsLocalInvalid()
- 11.x core/tests/Drupal/Tests/Component/Utility/UrlHelperTest.php \Drupal\Tests\Component\Utility\UrlHelperTest::testExternalIsLocalInvalid()
Tests invalid URL arguments.
@covers ::externalIsLocal @dataProvider providerTestExternalIsLocalInvalid
Parameters
string $url: The URL to test.
string $base_url: The base URL.
File
-
core/
tests/ Drupal/ Tests/ Component/ Utility/ UrlHelperTest.php, line 625
Class
- UrlHelperTest
- @group Utility
Namespace
Drupal\Tests\Component\UtilityCode
public function testExternalIsLocalInvalid($url, $base_url) {
$this->expectException(\InvalidArgumentException::class);
UrlHelper::externalIsLocal($url, $base_url);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.