You are here

public function PreviewLinkAccessTest::previewAccessDeniedDataProvider in Preview Link 2.0.x

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

Data provider for testPreviewAccess().

File

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

Class

PreviewLinkAccessTest
Test preview link access.

Namespace

Drupal\Tests\preview_link\Kernel

Code

public function previewAccessDeniedDataProvider() : array {
  return [
    'empty token' => [
      'node',
      1,
      '',
      FALSE,
    ],
    'invalid token' => [
      'node',
      1,
      'invalid 123',
      FALSE,
    ],
    'invalid entity id' => [
      'node',
      99,
      'correct-token',
      FALSE,
    ],
  ];
}