You are here

function authcache_test_authcache_cookie_alter in Authenticated User Page Caching (Authcache) 7.2

Implements hook_authcache_cookie_alter().

2 string references to 'authcache_test_authcache_cookie_alter'
AuthcacheCookiesTestCase::testCookieHooks in ./authcache.test
Verify that hook_authcache_cookie is called on every request.
AuthcacheWebTestCase::resetTestVariables in ./authcache.test
Reset the variables used for communicating to authcache_test module.

File

tests/authcache_test.module, line 441
Mock module to aid in testing authcache.module.

Code

function authcache_test_authcache_cookie_alter(&$cookies, $account) {

  // Do not record anything resulting from test user login/logout
  if (variable_get('authcache_test_record')) {
    variable_set('authcache_test_authcache_cookie_alter', array(
      $cookies,
      $account->uid,
    ));
  }
  if ($cookierec = variable_get('authcache_test_cookie_alter')) {
    list($name, $value) = $cookierec;
    $cookies[$name] = $value;
  }
}