Example #1
0
 /**
  * Get a mock response from a file
  *
  * @param string $path File to retrieve a mock response from
  *
  * @return Response
  * @throws InvalidArgumentException if the file is not found
  */
 public static function getMockFile($path)
 {
     if (!file_exists($path)) {
         throw new InvalidArgumentException('Unable to open mock file: ' . $path);
     }
     return Response::fromMessage(file_get_contents($path));
 }