protected function AuthcacheP13nTestRequestBuilder::assertStub in Authenticated User Page Caching (Authcache) 7.2
Test whether the given stub passes the invocation verifier.
1 call to AuthcacheP13nTestRequestBuilder::assertStub()
- AuthcacheP13nTestRequestBuilder::testRequestResourcesNullFragments in modules/
authcache_p13n/ tests/ authcache_p13n.request-builder.test - Cover authcache_p13n_request_resources().
File
- modules/
authcache_p13n/ tests/ authcache_p13n.request-builder.test, line 38 - Defines test classes for request builder.
Class
- AuthcacheP13nTestRequestBuilder
- Request builder test cases.
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);
}