You are here

protected function CommentTest::getExpectedUnauthorizedAccessCacheability in JSON:API 8.2

Same name and namespace in other branches
  1. 8 tests/src/Functional/CommentTest.php \Drupal\Tests\jsonapi\Functional\CommentTest::getExpectedUnauthorizedAccessCacheability()

Returns the expected cacheability for an unauthorized response.

Return value

\Drupal\Core\Cache\CacheableMetadata The expected cacheability.

Overrides ResourceTestBase::getExpectedUnauthorizedAccessCacheability

File

tests/src/Functional/CommentTest.php, line 404

Class

CommentTest
JSON:API integration test for the "Comment" content entity type.

Namespace

Drupal\Tests\jsonapi\Functional

Code

protected function getExpectedUnauthorizedAccessCacheability() {

  // @see \Drupal\comment\CommentAccessControlHandler::checkAccess()
  return parent::getExpectedUnauthorizedAccessCacheability()
    ->addCacheTags([
    'comment:1',
  ]);
}