You are here

public function AuthcacheP13nTestStubVerifyer::verify in Authenticated User Page Caching (Authcache) 7.2

Test whether the the expectations are fullfilled.

File

modules/authcache_p13n/tests/authcache_p13n.stub.inc, line 124
Stub classes for testing.

Class

AuthcacheP13nTestStubVerifyer
Simple invocation verifier class.

Code

public function verify(&$message) {
  $invocations = $this->observer
    ->invocations($this->name);
  $checks = $this->checks;
  if (empty($checks)) {
    $checks = array(
      AuthcacheP13nTestStubVerifyer::once(),
    );
  }
  foreach ($checks as $checkfunc) {
    if (!$checkfunc($invocations, $this->name, $message)) {
      return FALSE;
    }
  }
  return TRUE;
}