You are here

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

Test whether the given stub passes the invocation verifier.

3 calls to AuthcacheP13nTestMarkup::assertStub()
AuthcacheP13nTestMarkup::testCustomClientMarkup in modules/authcache_p13n/tests/authcache_p13n.markup.test
Cover theme_authcache_p13n_X().
AuthcacheP13nTestMarkup::testDefaultFallbackMarkup in modules/authcache_p13n/tests/authcache_p13n.markup.test
Cover theme_authcache_p13n_X default fallback markup.
AuthcacheP13nTestMarkup::testInfoFunctions in modules/authcache_p13n/tests/authcache_p13n.markup.test
Cover authcache_p13n_X_info().

File

modules/authcache_p13n/tests/authcache_p13n.markup.test, line 38
Define tests for markup substitution.

Class

AuthcacheP13nTestMarkup
Tests for markup substitution.

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