preCalls; if ($this->failPre) { return false; } } public function postRequest(HTTPRequest $request, HTTPResponse $response, DataModel $model) { ++$this->postCalls; if ($this->failPost) { return false; } } public function reset() { $this->preCalls = 0; $this->postCalls = 0; } }