3
namespace GuzzleHttp\Tests\Adapter;
5
use GuzzleHttp\Adapter\Transaction;
7
use GuzzleHttp\Message\Request;
8
use GuzzleHttp\Message\Response;
11
* @covers GuzzleHttp\Adapter\Transaction
13
class TransactionTest extends \PHPUnit_Framework_TestCase
15
public function testHasRequestAndClient()
18
$req = new Request('GET', '/');
19
$response = new Response(200);
20
$t = new Transaction($c, $req);
21
$this->assertSame($c, $t->getClient());
22
$this->assertSame($req, $t->getRequest());
23
$this->assertNull($t->getResponse());
24
$t->setResponse($response);
25
$this->assertSame($response, $t->getResponse());