You are here

protected function AuthcacheP13nTestSession::assertStub in Authenticated User Page Caching (Authcache) 7.2

Test whether the given stub passes the invocation verifier.

3 calls to AuthcacheP13nTestSession::assertStub()
AuthcacheP13nTestSession::testInvalidateOnLoginAndLogout in modules/authcache_p13n/tests/authcache_p13n.session.test
Ensure that the browser session is invalidated upon login/logout.
AuthcacheP13nTestSession::testInvalidateOnPost in modules/authcache_p13n/tests/authcache_p13n.session.test
Ensure that browser session is invalidated on every post request.
AuthcacheP13nTestSession::testInvalidateWhenSessionOpen in modules/authcache_p13n/tests/authcache_p13n.session.test
Ensure that a cookie is set as soon as there is some data in the session.

File

modules/authcache_p13n/tests/authcache_p13n.session.test, line 38
Define test for browser cache invalidation.

Class

AuthcacheP13nTestSession
Tests browser cache invalidation.

Code

protected function assertStub(HookStubProxy $stub, $verifier, $message = NULL) {
  $result = $stub
    ->verify($verifier, $error);
  if (!$message) {
    $message = t('Verify invocation of hook @hook.', array(
      '@hook' => $stub
        ->hookname(),
    ));
  }
  if (!$result && is_string($error)) {
    $message .= ' ' . $error;
  }
  $this
    ->assertTrue($result, $message);
}