You are here

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

Test whether the given stub passes the invocation verifier.

2 calls to AuthcacheP13nTestConfigWidget::assertStub()
AuthcacheP13nTestConfigWidget::testFormElement in modules/authcache_p13n/tests/authcache_p13n.config.test
Cover form element authcache_p13n_config.
AuthcacheP13nTestConfigWidget::testFormElementClients in modules/authcache_p13n/tests/authcache_p13n.config.test
Cover form element authcache_p13n_config.

File

modules/authcache_p13n/tests/authcache_p13n.config.test, line 38
Defines test for authcache personalization configuration widget.

Class

AuthcacheP13nTestConfigWidget
Tests for authcache_p13n_config element.

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