public function UrlBagTest::testToAbsolute in Mini site 8
Tests toAbsolute() method.
@dataProvider dataProviderToAbsolute @covers \Drupal\minisite\UrlBag::toAbsolute
File
- tests/
src/ Kernel/ UrlBagTest.php, line 140
Class
- UrlBagTest
- Class UrlBagTest.
Namespace
Drupal\Tests\minisite\KernelCode
public function testToAbsolute($base_url, $url, $expected, $expect_exception = FALSE) {
if ($expect_exception) {
$this
->expectException(UrlBagException::class);
}
$actual = $this
->callProtectedMethod(UrlBag::class, 'toAbsolute', [
$url,
$base_url,
]);
$this
->assertEquals($expected, $actual);
}