PluginProbe
StockPack – Stock photos and AI images from Unsplash, Adobe Stock, Freepik and more / 2.5.7
StockPack – Stock photos and AI images from Unsplash, Adobe Stock, Freepik and more v2.5.7
3.7.2 3.7.1 3.7.0 3.6.0 3.6.1 3.5.2 trunk 2.0 2.1 2.2 2.3 2.4 2.4.1 2.4.2 2.4.3 2.5.0 2.5.1 2.5.2 2.5.3 2.5.4 2.5.5 2.5.6 2.5.7 2.6.0 2.6.1 All 73 releases
stockpack / vendor / guzzlehttp / guzzle / tests / Exception / ConnectExceptionTest.php

ConnectExceptionTest.php in StockPack – Stock photos and AI images from Unsplash, Adobe Stock, Freepik and more 2.5.7, at vendor/guzzlehttp/guzzle/tests/Exception/ConnectExceptionTest.php

26 lines 764 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace GuzzleHttp\Tests\Exception;
3
4 use GuzzleHttp\Exception\ConnectException;
5 use GuzzleHttp\Psr7\Request;
6 use PHPUnit\Framework\TestCase;
7
8 /**
9 * @covers \GuzzleHttp\Exception\ConnectException
10 */
11 class ConnectExceptionTest extends TestCase
12 {
13 public function testHasNoResponse()
14 {
15 $req = new Request('GET', '/');
16 $prev = new \Exception();
17 $e = new ConnectException('foo', $req, $prev, ['foo' => 'bar']);
18 self::assertSame($req, $e->getRequest());
19 self::assertNull($e->getResponse());
20 self::assertFalse($e->hasResponse());
21 self::assertSame('foo', $e->getMessage());
22 self::assertSame('bar', $e->getHandlerContext()['foo']);
23 self::assertSame($prev, $e->getPrevious());
24 }
25 }
26