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