NgLightboxWebTest.php in NG Lightbox 8
File
src/Tests/NgLightboxWebTest.php
View source
<?php
namespace Drupal\ng_lightbox\Tests;
use Drupal\simpletest\WebTestBase;
class NgLightboxWebTest extends WebTestBase {
protected $profile = 'minimal';
public static $modules = [
'ng_lightbox',
'views',
'node',
'filter',
];
public function setUp() {
parent::setUp();
$config = \Drupal::configFactory()
->getEditable('ng_lightbox.settings');
$this
->createContentType([
'type' => 'page',
]);
$node = $this
->drupalCreateNode();
$config
->set('patterns', '/node/' . $node
->id());
$config
->save();
}
public function testDefaultModal() {
$this
->drupalGet('/node');
$this
->assertRaw('data-dialog-type="modal"');
}
}