You are here

public function PreviewLinkAccessTest::setUp in Preview Link 8

Same name and namespace in other branches
  1. 2.x tests/src/Kernel/PreviewLinkAccessTest.php \Drupal\Tests\preview_link\Kernel\PreviewLinkAccessTest::setUp()
  2. 2.0.x tests/src/Kernel/PreviewLinkAccessTest.php \Drupal\Tests\preview_link\Kernel\PreviewLinkAccessTest::setUp()

Overrides PreviewLinkBase::setUp

File

tests/src/Kernel/PreviewLinkAccessTest.php, line 31

Class

PreviewLinkAccessTest
Test preview link access.

Namespace

Drupal\Tests\preview_link\Kernel

Code

public function setUp() {
  parent::setUp();
  $this->node = $this
    ->createNode();
  $this->previewLink = PreviewLink::create([
    'entity_type_id' => 'node',
    'entity_id' => $this->node
      ->id(),
  ]);
  $this->previewLink
    ->save();
}