function AccessResultTest::assertDefaultCacheability

Same name in other branches
  1. 8.9.x core/tests/Drupal/Tests/Core/Access/AccessResultTest.php \Drupal\Tests\Core\Access\AccessResultTest::assertDefaultCacheability()
  2. 10 core/tests/Drupal/Tests/Core/Access/AccessResultTest.php \Drupal\Tests\Core\Access\AccessResultTest::assertDefaultCacheability()
  3. 11.x core/tests/Drupal/Tests/Core/Access/AccessResultTest.php \Drupal\Tests\Core\Access\AccessResultTest::assertDefaultCacheability()

@internal

7 calls to AccessResultTest::assertDefaultCacheability()
AccessResultTest::testAccessAllowed in core/tests/Drupal/Tests/Core/Access/AccessResultTest.php
@covers ::allowed @covers ::isAllowed @covers ::isForbidden @covers ::isNeutral
AccessResultTest::testAccessConditionallyAllowed in core/tests/Drupal/Tests/Core/Access/AccessResultTest.php
@covers ::allowedIf @covers ::isAllowed @covers ::isForbidden @covers ::isNeutral
AccessResultTest::testAccessConditionallyForbidden in core/tests/Drupal/Tests/Core/Access/AccessResultTest.php
@covers ::forbiddenIf @covers ::isAllowed @covers ::isForbidden @covers ::isNeutral
AccessResultTest::testAccessForbidden in core/tests/Drupal/Tests/Core/Access/AccessResultTest.php
@covers ::forbidden @covers ::isAllowed @covers ::isForbidden @covers ::isNeutral
AccessResultTest::testAndIf in core/tests/Drupal/Tests/Core/Access/AccessResultTest.php
@covers ::andIf

... See full list

File

core/tests/Drupal/Tests/Core/Access/AccessResultTest.php, line 51

Class

AccessResultTest
@coversDefaultClass \Drupal\Core\Access\AccessResult @group Access

Namespace

Drupal\Tests\Core\Access

Code

protected function assertDefaultCacheability(AccessResult $access) : void {
    $this->assertSame([], $access->getCacheContexts());
    $this->assertSame([], $access->getCacheTags());
    $this->assertSame(Cache::PERMANENT, $access->getCacheMaxAge());
}

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