class NgLightboxWebTest in NG Lightbox 2.x
Same name and namespace in other branches
- 8 src/Tests/NgLightboxWebTest.php \Drupal\ng_lightbox\Tests\NgLightboxWebTest
A web test for NG Lightbox.
@group ng_lightbox
Hierarchy
- class \Drupal\ng_lightbox\Tests\NgLightboxWebTest extends \Drupal\simpletest\WebTestBase
Expanded class hierarchy of NgLightboxWebTest
File
- src/
Tests/ NgLightboxWebTest.php, line 12
Namespace
Drupal\ng_lightbox\TestsView source
class NgLightboxWebTest extends WebTestBase {
/**
* {@inheritdoc}
*/
protected $profile = 'minimal';
/**
* Modules to install.
*
* @var array
*/
public static $modules = [
'ng_lightbox',
'views',
'node',
'filter',
];
/**
* {@inheritdoc}
*/
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();
}
/**
* Test that we can render a modal even before selecting one from the admin.
*/
public function testDefaultModal() {
$this
->drupalGet('/node');
$this
->assertRaw('data-dialog-type="modal"');
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
NgLightboxWebTest:: |
public static | property | Modules to install. | |
NgLightboxWebTest:: |
protected | property | ||
NgLightboxWebTest:: |
public | function | ||
NgLightboxWebTest:: |
public | function | Test that we can render a modal even before selecting one from the admin. |