You are here

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

Test whether the given stub passes the invocation verifier.

3 calls to AuthcacheP13nTestClient::assertStub()
AuthcacheP13nTestClient::testGetPreferredClientCustomList in modules/authcache_p13n/tests/authcache_p13n.client.test
Cover authcache_p13n_client_get_preferred() with custom list.
AuthcacheP13nTestClient::testGetPreferredClientDefaultClientList in modules/authcache_p13n/tests/authcache_p13n.client.test
Cover authcache_p13n_client_get_preferred().
AuthcacheP13nTestClient::testHookClientInfo in modules/authcache_p13n/tests/authcache_p13n.client.test
Cover authcache_p13n_client_info().

File

modules/authcache_p13n/tests/authcache_p13n.client.test, line 38
Defines tests for markup replacement clients.

Class

AuthcacheP13nTestClient
Tests update functionality unrelated to the database.

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