You are here

public function AuthcacheP13nTestStubObserver::record in Authenticated User Page Caching (Authcache) 7.2

Record one method invocation.

File

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

Class

AuthcacheP13nTestStubObserver
Simple invocation recorder class.

Code

public function record($object, $method, $arguments) {
  $name = $this
    ->boundMethodName($object, $method);

  // Record invocation.
  $this->invocations[$name][] = $arguments;
  $result = isset($this->returns[$name]) ? $this->returns[$name] : NULL;
  if (is_object($result) && $result instanceof Exception) {
    throw $result;
  }

  // Return result.
  return $result;
}