protected function AuthcacheTestBackend::assertNoCacheControl in Authenticated User Page Caching (Authcache) 7.2
Assert that a certain directive is not in the Cache-Control header.
2 calls to AuthcacheTestBackend::assertNoCacheControl()
- AuthcacheTestBackend::testVaryHeaderWithAuthcacheConfig in tests/
authcache.backend.test - Test presence of X-Authcache-Key header on HTTP response.
- AuthcacheTestBackend::testVaryHeaderWithoutAuthcacheConfig in tests/
authcache.backend.test - Test presence of Vary header when authcache is disabled (per config).
File
- tests/
authcache.backend.test, line 87 - Test cases for pluggable cache backends.
Class
- AuthcacheTestBackend
- Cover authcache module.
Code
protected function assertNoCacheControl($rejectcc, $message = NULL) {
$ccheader = $this
->drupalGetHeader('Cache-Control') ?: '';
$ccfields = array_map('trim', explode(',', $ccheader));
$this
->assert(!in_array($rejectcc, $ccfields), $message ?: t('Found unexpected @field in Cache-Control: @header.', array(
'@field' => $rejectcc,
'@header' => $ccheader,
)));
}