You are here

protected function CommentTest::getExpectedUnauthorizedAccessCacheability in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/jsonapi/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

core/modules/jsonapi/tests/src/Functional/CommentTest.php, line 375

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',
  ]);
}