/** * Test that the callback passed params are correct */ public function testPassedParams() { $authorization = new ContextAuthorization(); $callbackMock = $this->getMock("Cake\\Controller\\Controllerr", ["callback"], [], '', false); $callbackMock->expects($this->once())->method("callback")->with($this->context, 'param')->willReturn(true); $authorization->initialize($this->context, [$callbackMock, "callback"]); $authorization->resolve('param'); }