public function PreviewLinkAccessTest::setUp in Preview Link 2.0.x
Same name and namespace in other branches
- 8 tests/src/Kernel/PreviewLinkAccessTest.php \Drupal\Tests\preview_link\Kernel\PreviewLinkAccessTest::setUp()
- 2.x tests/src/Kernel/PreviewLinkAccessTest.php \Drupal\Tests\preview_link\Kernel\PreviewLinkAccessTest::setUp()
Overrides PreviewLinkBase::setUp
File
- tests/
src/ Kernel/ PreviewLinkAccessTest.php, line 50
Class
- PreviewLinkAccessTest
- Test preview link access.
Namespace
Drupal\Tests\preview_link\KernelCode
public function setUp() {
parent::setUp();
$this
->installConfig([
'node',
'filter',
]);
$this
->createContentType([
'type' => 'page',
]);
$this->storage = $this->container
->get('entity_type.manager')
->getStorage('preview_link');
$this->node = $this
->createNode();
$this->previewLink = PreviewLink::create()
->addEntity($this->node);
$this->previewLink
->save();
}