TestCase::setUp()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 9
rs 9.6666
c 0
b 0
f 0
cc 1
eloc 6
nc 1
nop 0
1
<?php
2
3
namespace CouchDB\Tests;
4
5
use CouchDB\Connection;
6
use GuzzleHttp\Client;
7
use GuzzleHttp\Handler\MockHandler;
8
use GuzzleHttp\HandlerStack;
9
10
/**
11
 * @author Markus Bachmann <[email protected]>
12
 */
13
class TestCase extends \PHPUnit_Framework_TestCase
14
{
15
    protected $mock;
16
17
    protected $client;
18
19
    protected $connection;
20
21
    protected function setUp()
22
    {
23
        $this->mock = new MockHandler();
24
        $this->client = new Client([
25
            'handler'     => HandlerStack::create($this->mock),
26
            'http_errors' => false,
27
        ]);
28
        $this->connection = new Connection($this->client);
29
    }
30
}
31