public function PreviewLinkAccessTest::testPreviewAccessAllowed 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::testPreviewAccessAllowed()
- 2.x tests/src/Kernel/PreviewLinkAccessTest.php \Drupal\Tests\preview_link\Kernel\PreviewLinkAccessTest::testPreviewAccessAllowed()
Ensure access is allowed with a valid token.
File
- tests/
src/ Kernel/ PreviewLinkAccessTest.php, line 85
Class
- PreviewLinkAccessTest
- Test preview link access.
Namespace
Drupal\Tests\preview_link\KernelCode
public function testPreviewAccessAllowed() : void {
$access = $this->container
->get('access_check.preview_link')
->access($this->node, $this->previewLink
->getToken());
$this
->assertEquals(TRUE, $access
->isAllowed());
}