~ballot/wordpress/openstack-objectstorage-breaking-insight

« back to all changes in this revision

Viewing changes to vendor/guzzlehttp/guzzle/tests/Adapter/TransactionTest.php

  • Committer: Jacek Nykis
  • Date: 2015-02-11 15:35:31 UTC
  • Revision ID: jacek.nykis@canonical.com-20150211153531-hmy6zi0ov2qfkl0b
Initial commit

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?php
 
2
 
 
3
namespace GuzzleHttp\Tests\Adapter;
 
4
 
 
5
use GuzzleHttp\Adapter\Transaction;
 
6
use GuzzleHttp\Client;
 
7
use GuzzleHttp\Message\Request;
 
8
use GuzzleHttp\Message\Response;
 
9
 
 
10
/**
 
11
 * @covers GuzzleHttp\Adapter\Transaction
 
12
 */
 
13
class TransactionTest extends \PHPUnit_Framework_TestCase
 
14
{
 
15
    public function testHasRequestAndClient()
 
16
    {
 
17
        $c = new Client();
 
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());
 
26
    }
 
27
}