LibCurlTest   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 2
dl 0
loc 25
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 4 1
A testShouldBeInstantiated() 0 4 1
A testShouldCallAllMethods() 0 9 1
1
<?php
2
3
namespace Ip2c\Test\Unit;
4
5
use Ip2c\Curl\LibCurl;
6
use Prophecy\Argument;
7
8
class LibCurlTest extends \PHPUnit_Framework_TestCase
9
{
10
    /** @var LibCurl */
11
    private $sut;
12
13
    public function setUp()
14
    {
15
        $this->sut = new LibCurl();
16
    }
17
18
    public function testShouldBeInstantiated()
19
    {
20
        $this->assertInstanceOf('Ip2c\Curl\LibCurl', $this->sut);
21
    }
22
23
    public function testShouldCallAllMethods()
24
    {
25
        $resource = $this->sut->init();
26
        $this->sut->setOpt($resource, CURLOPT_POST, 0);
27
        $this->sut->exec($resource);
28
        $this->sut->errno($resource);
29
        $this->sut->error($resource);
30
        $this->sut->close($resource);
31
    }
32
}
33