client = new Client(); $content = null; if (null != $responseFile) { $filePath = dirname(__FILE__).'/resources/'.$responseFile; $content = file_get_contents($filePath, true); } $response = new Response($httpStatus, ['Content-Type' => 'application/json'], $content); $this->client->addResponse($response); } }