function UnroutedUrlAssemblerTest::testAssembleWithExternalUrl
Same name in other branches
- 9 core/tests/Drupal/Tests/Core/Utility/UnroutedUrlAssemblerTest.php \Drupal\Tests\Core\Utility\UnroutedUrlAssemblerTest::testAssembleWithExternalUrl()
- 8.9.x core/tests/Drupal/Tests/Core/Utility/UnroutedUrlAssemblerTest.php \Drupal\Tests\Core\Utility\UnroutedUrlAssemblerTest::testAssembleWithExternalUrl()
- 11.x core/tests/Drupal/Tests/Core/Utility/UnroutedUrlAssemblerTest.php \Drupal\Tests\Core\Utility\UnroutedUrlAssemblerTest::testAssembleWithExternalUrl()
@covers ::assemble @covers ::buildExternalUrl
@dataProvider providerTestAssembleWithExternalUrl
File
-
core/
tests/ Drupal/ Tests/ Core/ Utility/ UnroutedUrlAssemblerTest.php, line 81
Class
- UnroutedUrlAssemblerTest
- @coversDefaultClass \Drupal\Core\Utility\UnroutedUrlAssembler @group Utility
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.