protected function AuthcacheFormTestTokenDeferral::assertStub in Authenticated User Page Caching (Authcache) 7.2
Test whether the given stub passes the invocation verifier.
2 calls to AuthcacheFormTestTokenDeferral::assertStub()
- AuthcacheFormTestTokenDeferral::testCachedFormBuildID in modules/
authcache_form/ tests/ authcache_form.test - Test functionality for form-build-id.
- AuthcacheFormTestTokenDeferral::testTokenDefer in modules/
authcache_form/ tests/ authcache_form.test - Test token deferral functionality.
File
- modules/
authcache_form/ tests/ authcache_form.test, line 532 - Test classes for Authcache Form module.
Class
- AuthcacheFormTestTokenDeferral
- Test defer form tokens
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);
}