Файл: vkolhoze.com/vendor/guzzle/guzzle/tests/Guzzle/Tests/Mock/ErrorResponseMock.php
Строк: 42
<?php
namespace GuzzleTestsMock;
use GuzzlePluginErrorResponseErrorResponseExceptionInterface;
use GuzzleServiceCommandCommandInterface;
use GuzzleHttpMessageResponse;
class ErrorResponseMock extends Exception implements ErrorResponseExceptionInterface
{
public $command;
public $response;
public static function fromCommand(CommandInterface $command, Response $response)
{
return new self($command, $response);
}
public function __construct($command, $response)
{
$this->command = $command;
$this->response = $response;
$this->message = 'Error from ' . $response;
}
}