You are here

public function NgLightboxWebTest::setUp in NG Lightbox 2.x

Same name and namespace in other branches
  1. 8 src/Tests/NgLightboxWebTest.php \Drupal\ng_lightbox\Tests\NgLightboxWebTest::setUp()

File

src/Tests/NgLightboxWebTest.php, line 29

Class

NgLightboxWebTest
A web test for NG Lightbox.

Namespace

Drupal\ng_lightbox\Tests

Code

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();
}