PluginProbe
StockPack – Stock photos and AI images from Unsplash, Adobe Stock, Freepik and more / 2.5.0
StockPack – Stock photos and AI images from Unsplash, Adobe Stock, Freepik and more v2.5.0
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 / TransferStatsTest.php

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

31 lines 963 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace GuzzleHttp\Tests;
3
4 use GuzzleHttp\Psr7;
5 use GuzzleHttp\TransferStats;
6 use PHPUnit\Framework\TestCase;
7
8 class TransferStatsTest extends TestCase
9 {
10 public function testHasData()
11 {
12 $request = new Psr7\Request('GET', 'http://foo.com');
13 $response = new Psr7\Response();
14 $stats = new TransferStats(
15 $request,
16 $response,
17 10.5,
18 null,
19 ['foo' => 'bar']
20 );
21 self::assertSame($request, $stats->getRequest());
22 self::assertSame($response, $stats->getResponse());
23 self::assertTrue($stats->hasResponse());
24 self::assertSame(['foo' => 'bar'], $stats->getHandlerStats());
25 self::assertSame('bar', $stats->getHandlerStat('foo'));
26 self::assertSame($request->getUri(), $stats->getEffectiveUri());
27 self::assertEquals(10.5, $stats->getTransferTime());
28 self::assertNull($stats->getHandlerErrorData());
29 }
30 }
31