public function AccessResultTest::testCacheMaxAge in Drupal 10
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Core/Access/AccessResultTest.php \Drupal\Tests\Core\Access\AccessResultTest::testCacheMaxAge()
- 9 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 391 - 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());
}