You are here

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

Test whether the given stub passes the invocation verifier.

1 call to AuthcacheP13nTestFrontcontroller::assertStub()
AuthcacheP13nTestFrontcontroller::testRedirectDetection in modules/authcache_p13n/tests/authcache_p13n.frontcontroller.test
Test that a watchdog message is logged when frontcontroller redirects.

File

modules/authcache_p13n/tests/authcache_p13n.frontcontroller.test, line 46
Defines tests for authcache frontcontroller for personalized requests.

Class

AuthcacheP13nTestFrontcontroller
Tests for authcache frontcontroller for personalized requests.

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);
}