function UnroutedUrlAssemblerTest::testAssembleWithExternalUrl
Tests assemble with external url.
@legacy-covers ::assemble @legacy-covers ::buildExternalUrl
Attributes
#[DataProvider('providerTestAssembleWithExternalUrl')]
File
-
core/
tests/ Drupal/ Tests/ Core/ Utility/ UnroutedUrlAssemblerTest.php, line 90
Class
Namespace
Drupal\Tests\Core\UtilityCode
public function testAssembleWithExternalUrl($uri, array $options, $expected) : void {
$this->setupRequestStack(FALSE);
$this->assertEquals($expected, $this->unroutedUrlAssembler
->assemble($uri, $options));
$generated_url = $this->unroutedUrlAssembler
->assemble($uri, $options, TRUE);
$this->assertEquals($expected, $generated_url->getGeneratedUrl());
$this->assertInstanceOf('\\Drupal\\Core\\Render\\BubbleableMetadata', $generated_url);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.