public function PreviewLinkAccessTest::testPreviewAccessAllowed in Preview Link 8
Same name and namespace in other branches
- 2.x tests/src/Kernel/PreviewLinkAccessTest.php \Drupal\Tests\preview_link\Kernel\PreviewLinkAccessTest::testPreviewAccessAllowed()
- 2.0.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 66
Class
- PreviewLinkAccessTest
- Test preview link access.
Namespace
Drupal\Tests\preview_link\KernelCode
public function testPreviewAccessAllowed() {
$access = $this->container
->get('access_check.preview_link')
->access($this->node, $this->previewLink
->getToken());
$this
->assertEquals(TRUE, $access
->isAllowed());
}