You are here

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

Test whether the given stub passes the invocation verifier.

1 call to AuthcacheUbercartTest::assertStub()
AuthcacheUbercartTest::testUbercartAddToCartWithFormCache in modules/authcache_ubercart/authcache_ubercart.test
Test that products are added to the proper cart.

File

modules/authcache_ubercart/authcache_ubercart.test, line 66
Test cases for the Authcache Ubercart module.

Class

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