You are here

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

Test whether the given stub passes the invocation verifier.

4 calls to AuthcacheCommentTest::assertStub()
AuthcacheCommentTest::testCommentAttributionWithFormCache in modules/authcache_comment/authcache_comment.test
Test that comments get properly attributed when the form cache is in use.
AuthcacheCommentTest::testNoMarkupSubstitutionForGuestUser in modules/authcache_comment/authcache_comment.test
Ensure that markup is substituted for authcache enabled comments.
AuthcacheCommentTest::testNumberOfNewComments in modules/authcache_comment/authcache_comment.test
Test that the number of new comments is replaced by a placeholder.
AuthcacheCommentTest::testUserSettingInCommentForm in modules/authcache_comment/authcache_comment.test
Ensure that user setting is embedded for authenticated users.

File

modules/authcache_comment/authcache_comment.test, line 71
Test cases for the Authcache Comment module.

Class

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