public function UrlHelperTest::testExternalIsLocalInvalid in Drupal 10
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Component/Utility/UrlHelperTest.php \Drupal\Tests\Component\Utility\UrlHelperTest::testExternalIsLocalInvalid()
- 9 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 621
Class
- UrlHelperTest
- @group Utility
Namespace
Drupal\Tests\Component\UtilityCode
public function testExternalIsLocalInvalid($url, $base_url) {
$this
->expectException(\InvalidArgumentException::class);
UrlHelper::externalIsLocal($url, $base_url);
}