diff options
author | Andreas Baumann <mail@andreasbaumann.cc> | 2019-11-17 20:45:02 +0100 |
---|---|---|
committer | Andreas Baumann <mail@andreasbaumann.cc> | 2019-11-17 20:45:02 +0100 |
commit | 8df3db566a3a937b45ebf11adb90d265e6f5e2d4 (patch) | |
tree | 4d541098d751d5a9acf8c12f6fb9f308ace066ac /vendor/guzzle/guzzle/tests/Guzzle/Tests/Mock/ErrorResponseMock.php | |
download | flyspray-8df3db566a3a937b45ebf11adb90d265e6f5e2d4.tar.xz |
initial checking of customized version 1.0rc9
Diffstat (limited to 'vendor/guzzle/guzzle/tests/Guzzle/Tests/Mock/ErrorResponseMock.php')
-rw-r--r-- | vendor/guzzle/guzzle/tests/Guzzle/Tests/Mock/ErrorResponseMock.php | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/vendor/guzzle/guzzle/tests/Guzzle/Tests/Mock/ErrorResponseMock.php b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Mock/ErrorResponseMock.php new file mode 100644 index 0000000..aabb15f --- /dev/null +++ b/vendor/guzzle/guzzle/tests/Guzzle/Tests/Mock/ErrorResponseMock.php @@ -0,0 +1,25 @@ +<?php + +namespace Guzzle\Tests\Mock; + +use Guzzle\Plugin\ErrorResponse\ErrorResponseExceptionInterface; +use Guzzle\Service\Command\CommandInterface; +use Guzzle\Http\Message\Response; + +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; + } +} |