You are here

NgLightboxTest.php in NG Lightbox 2.x

File

tests/src/Kernel/NgLightboxTest.php
View source
<?php

namespace Drupal\Tests\ng_lightbox\Kernel;

use Drupal\Core\Url;
use Drupal\KernelTests\KernelTestBase;

/**
 * Test the NG Lightbox service.
 *
 * @group ng_lightbox
 */
class NgLightboxTest extends KernelTestBase {

  /**
   * Modules to install.
   *
   * @var array
   */
  public static $modules = [
    'system',
    'ng_lightbox',
  ];

  /**
   * Test a URL that only has a hash.
   */
  public function testHashOnlyUrls() {
    $url = Url::fromUserInput('#hash-only-url');
    $this
      ->assertFalse($this->container
      ->get('ng_lightbox')
      ->isNgLightboxEnabledPath($url));
  }

}

Classes

Namesort descending Description
NgLightboxTest Test the NG Lightbox service.