Completed
Pull Request — master (#63)
by Iman
14:50 queued 09:28
created

Chain::http()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 4
crap 1
1
<?php
2
3
namespace Imanghafoori\HeyMan\MakeSure;
4
5
class Chain
6
{
7
    private $phpunit;
8
9 38
    public function __construct($phpunit)
10
    {
11 38
        $this->phpunit = $phpunit;
12 38
    }
13
14
    public $http = [];
15
16
    public $assertion = [];
17
18
    public $event;
19
20
    public $exception;
21
22 38
    public function __destruct()
23
    {
24 38
        (new CheckExpectations($this, $this->phpunit))->check();
25 37
    }
26
27
    /**
28
     * @param $uri
29
     * @param array $data
30
     * @param array $headers
31
     * @param $method
32
     */
33 37
    public function http($uri, array $data, array $headers, $method)
34
    {
35 37
        $this->http = get_defined_vars();
36 37
    }
37
38
    /**
39
     * @param $value
40
     * @param $type
41
     */
42 29
    public function addAssertion($type, $value = null)
43
    {
44 29
        $this->assertion[] = get_defined_vars();
45 29
    }
46
}
47