You are here

public function AccessResultTest::testCacheMaxAge in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 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 323
Contains \Drupal\Tests\Core\Access\AccessResultTest.

Class

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

Namespace

Drupal\Tests\Core\Access

Code

public function testCacheMaxAge() {
  $this
    ->assertSame(Cache::PERMANENT, AccessResult::neutral()
    ->getCacheMaxAge());
  $this
    ->assertSame(1337, AccessResult::neutral()
    ->setCacheMaxAge(1337)
    ->getCacheMaxAge());
}