public function AccessResultTest::testCacheMaxAge in Drupal 9
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Core/Access/AccessResultTest.php \Drupal\Tests\Core\Access\AccessResultTest::testCacheMaxAge()
- 10 core/tests/Drupal/Tests/Core/Access/AccessResultTest.php \Drupal\Tests\Core\Access\AccessResultTest::testCacheMaxAge()
@covers ::setCacheMaxAge @covers ::getCacheMaxAge
File
- core/
tests/ Drupal/ Tests/ Core/ Access/ AccessResultTest.php, line 388 - Contains \Drupal\Tests\Core\Access\AccessResultTest.
Class
- AccessResultTest
- @coversDefaultClass \Drupal\Core\Access\AccessResult @group Access
Namespace
Drupal\Tests\Core\AccessCode
public function testCacheMaxAge() {
$this
->assertSame(Cache::PERMANENT, AccessResult::neutral()
->getCacheMaxAge());
$this
->assertSame(1337, AccessResult::neutral()
->setCacheMaxAge(1337)
->getCacheMaxAge());
}