You are here

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

Test whether the given stub passes the invocation verifier.

4 calls to AuthcacheTestBackend::assertStub()
AuthcacheTestBackend::testBackendInitFailures in tests/authcache.backend.test
Test multiple calls to drupal_backend_init().
AuthcacheTestBackend::testEtagHeader in tests/authcache.backend.test
Test value of Etag header.
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 96
Test cases for pluggable cache backends.

Class

AuthcacheTestBackend
Cover authcache module.

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