function UnroutedUrlAssemblerTest::testAssembleExternalUrls
Tests external URLs are only processed if necessary.
Attributes
#[TestWith([
'http://example.org',
'http://example.org',
])]
#[TestWith([
'http://example.org?flag',
'http://example.org?flag',
])]
#[TestWith([
'http://example.org?flag=',
'http://example.org?flag=',
])]
#[TestWith([
'http://example.org?flag=',
'http://example.org?flag',
[
'query' => [
'flag' => '',
],
],
])]
#[TestWith([
'http://example.org?tag=one&tag=two',
'http://example.org?tag=one&tag=two',
])]
#[TestWith([
'http://example.org?tag%5B0%5D=three',
'http://example.org?tag=one&tag=two',
[
'query' => [
'tag' => [
'three',
],
],
],
])]
File
-
core/
tests/ Drupal/ Tests/ Core/ Utility/ UnroutedUrlAssemblerTest.php, line 218
Class
Namespace
Drupal\Tests\Core\UtilityCode
public function testAssembleExternalUrls(string $expected, string $uri, array $options = []) : void {
$this->setupRequestStack(FALSE);
$result = $this->unroutedUrlAssembler
->assemble($uri, $options);
$this->assertEquals($expected, $result);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.