GuzzleTest   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Importance

Changes 0
Metric Value
wmc 3
c 0
b 0
f 0
lcom 0
cbo 4
dl 0
loc 38
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A testSendRequest() 0 9 1
A testSendRequestWithOutcome() 0 9 1
A createHttpAdapter() 0 4 1
1
<?php
2
3
/*
4
 * (c) Markus Lanthaler <[email protected]>
5
 *
6
 * For the full copyright and license information, please view the LICENSE
7
 * file that was distributed with this source code.
8
 */
9
10
namespace ML\FgcClient\Test;
11
12
use Http\Client\HttpClient;
13
use Http\Client\Tests\HttpClientTest;
14
use Http\Message\MessageFactory\GuzzleMessageFactory;
15
use Http\Message\StreamFactory\GuzzleStreamFactory;
16
use ML\FgcClient\FgcHttpClient;
17
18
/**
19
 * Tests for {@link FgcHttpClient}
20
 */
21
class GuzzleTest extends HttpClientTest
22
{
23
    /**
24
     * @dataProvider requestProvider
25
     * @group        integration
26
     */
27
    public function testSendRequest($method, $uri, array $headers, $body)
28
    {
29
        parent::testSendRequest(
30
            $method,
31
            $uri,
32
            $headers,
33
            $body
34
        );
35
    }
36
37
    /**
38
     * @dataProvider requestWithOutcomeProvider
39
     * @group        integration
40
     */
41
    public function testSendRequestWithOutcome($uriAndOutcome, $protocolVersion, array $headers, $body)
42
    {
43
        parent::testSendRequestWithOutcome(
44
            $uriAndOutcome,
45
            $protocolVersion,
46
            $headers,
47
            $body
48
        );
49
    }
50
51
    /**
52
     * @return HttpClient
53
     */
54
    protected function createHttpAdapter()
55
    {
56
        return new FgcHttpClient(new GuzzleMessageFactory(), new GuzzleStreamFactory());
57
    }
58
}
59