public static function HookStub::verify in Authenticated User Page Caching (Authcache) 7.2
Verify invocations.
Parameters
string $hookname: The fully qualified name of a function in a stub-module.
callable $checkfunc: Use this function to test invocation expectations.
string $message: A reference to a string for the validation message.
Return value
bool Return TRUE when expectations are met, FALSE otherwise.
1 call to HookStub::verify()
- HookStubProxy::verify in tests/
HookStub.inc - Verify invocations.
File
- tests/
HookStub.inc, line 224 - Defines some helper classes for stubbing and recording hook invocations.
Class
- HookStub
- Static methods for keeping track of enabled hooks and invocations.
Code
public static function verify($hookname, $checkfunc, &$message) {
if ($stub = variable_get('hookstub_' . $hookname)) {
if (!isset($checkfunc)) {
$checkfunc = HookStub::once();
}
return $checkfunc($stub->invocations, $message);
}
$message .= ' ' . t('No information available.');
}