You are here

public function NgLightboxTest::testEmptyPath in NG Lightbox 8

Same name and namespace in other branches
  1. 2.x tests/src/Unit/NgLightboxTest.php \Drupal\Tests\ng_lightbox\Unit\NgLightboxTest::testEmptyPath()

Test with an empty path.

File

tests/src/Unit/NgLightboxTest.php, line 40
Contains \Drupal\Tests\ng_lightbox\Unit\NgLightboxTest

Class

NgLightboxTest
@coversDefaultClass \Drupal\ng_lightbox\NgLightbox @group ng_lightbox

Namespace

Drupal\Tests\ng_lightbox\Unit

Code

public function testEmptyPath() {
  $lightbox = $this
    ->getLightbox(FALSE);
  $url = $this
    ->getUrlMock();
  $url
    ->toString()
    ->willReturn('');
  $this
    ->assertEquals(FALSE, $lightbox
    ->isNgLightboxEnabledPath($url
    ->reveal()));
}