You are here

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

Invocation verifier matching the arguments of a given invocation.

8 calls to AuthcacheP13nTestStubVerifyer::args()
AuthcacheP13nTestDefaultRequestHandler::testDefaultRequestHandler in modules/authcache_p13n/tests/authcache_p13n.request-handler.test
Test default configuration.
AuthcacheP13nTestDefaultRequestHandler::testDefaultRequestHandlerWithContextProvider in modules/authcache_p13n/tests/authcache_p13n.request-handler.test
Test handler with context provider.
AuthcacheP13nTestDefaultRequestHandler::testDefaultRequestHandlerWithRequestFilter in modules/authcache_p13n/tests/authcache_p13n.request-handler.test
Test handler with request filter.
AuthcacheP13nTestDefaultRequestHandler::testDefaultRequestHandlerWithResponseFilter in modules/authcache_p13n/tests/authcache_p13n.request-handler.test
Test handler with response filter.
AuthcacheP13nTestFragmentBuilder::testFragmentBuilder in modules/authcache_p13n/tests/authcache_p13n.request-handler.test
Tests fragment request.

... See full list

File

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

Class

AuthcacheP13nTestStubVerifyer
Simple invocation verifier class.

Code

public static function args($args = array(), $invoc = 0) {

  // Necessary until #1272900 lands
  // @ignore style_function_spacing
  return function ($invocations, $name, &$message) use ($args, $invoc) {
    $message = t('@name: On invocation number @invoc, expecting arguments @this and got @that.', array(
      '@name' => $name,
      '@invoc' => $invoc,
      '@this' => var_export($args, TRUE),
      '@that' => var_export($invocations[$invoc], TRUE),
    ));
    return $invocations[$invoc] === $args;
  };
}