function MediaResourceTestBase::getExpectedUnauthorizedEntityAccessCacheability

Same name in other branches
  1. 9 core/modules/media/tests/src/Functional/Rest/MediaResourceTestBase.php \Drupal\Tests\media\Functional\Rest\MediaResourceTestBase::getExpectedUnauthorizedEntityAccessCacheability()
  2. 8.9.x core/modules/media/tests/src/Functional/Rest/MediaResourceTestBase.php \Drupal\Tests\media\Functional\Rest\MediaResourceTestBase::getExpectedUnauthorizedEntityAccessCacheability()
  3. 10 core/modules/media/tests/src/Functional/Rest/MediaResourceTestBase.php \Drupal\Tests\media\Functional\Rest\MediaResourceTestBase::getExpectedUnauthorizedEntityAccessCacheability()

Overrides EntityResourceTestBase::getExpectedUnauthorizedEntityAccessCacheability

File

core/modules/media/tests/src/Functional/Rest/MediaResourceTestBase.php, line 479

Class

MediaResourceTestBase

Namespace

Drupal\Tests\media\Functional\Rest

Code

protected function getExpectedUnauthorizedEntityAccessCacheability($is_authenticated) {
    // @see \Drupal\media\MediaAccessControlHandler::checkAccess()
    return parent::getExpectedUnauthorizedEntityAccessCacheability($is_authenticated)->addCacheTags([
        'media:1',
    ]);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.