You are here

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

Test whether the given stub passes the invocation verifier.

3 calls to AuthcacheFlagTest::assertStub()
AuthcacheFlagTest::testNodeMarkupSubstitution in modules/authcache_flag/authcache_flag.test
Test that the flag markup is substituted by a partial.
AuthcacheFlagTest::testTaxonomyTermMarkupSubstitution in modules/authcache_flag/authcache_flag.test
Test that the flag markup is substituted by a partial for taxonomy terms.
AuthcacheFlagTest::testUserMarkupSubstitution in modules/authcache_flag/authcache_flag.test
Test that the flag markup is substituted by a partial.

File

modules/authcache_flag/authcache_flag.test, line 182
Test cases for the Authcache Flag module.

Class

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