You are here

public function NgLightboxTest::testHashOnlyUrls in NG Lightbox 2.x

Same name and namespace in other branches
  1. 8 tests/src/Kernel/NgLightboxTest.php \Drupal\Tests\ng_lightbox\Kernel\NgLightboxTest::testHashOnlyUrls()

Test a URL that only has a hash.

File

tests/src/Kernel/NgLightboxTest.php, line 25

Class

NgLightboxTest
Test the NG Lightbox service.

Namespace

Drupal\Tests\ng_lightbox\Kernel

Code

public function testHashOnlyUrls() {
  $url = Url::fromUserInput('#hash-only-url');
  $this
    ->assertFalse($this->container
    ->get('ng_lightbox')
    ->isNgLightboxEnabledPath($url));
}