You are here

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

Test whether the given stub passes the invocation verifier.

1 call to AuthcacheFieldTest::assertStub()
AuthcacheFieldTest::testNodeMarkupSubstitution in modules/authcache_field/authcache_field.test
Test that the field markup is substituted by a partial.

File

modules/authcache_field/authcache_field.test, line 85
Test cases for the Authcache Field module.

Class

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