TestCase   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 4

Importance

Changes 4
Bugs 0 Features 0
Metric Value
wmc 1
lcom 1
cbo 4
dl 0
loc 18
rs 10
c 4
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 9 1
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