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