Test Failed
Push — master ( 3e96d2...d4b731 )
by Dan
06:30
created

RouterResponseTest::setUp()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 6
nc 1
nop 0
1
<?php
2
3
namespace Tests\Ds\Router;
4
5
use Ds\Router\RouterResponse;
6
7
/**
8
 * Class RouterResponseTest
9
 * @package Tests\Ds\Router
10
 */
11
class RouterResponseTest extends \PHPUnit_Framework_TestCase
12
{
13
14
    /**
15
     * @var int
16
     */
17
    public $code;
18
19
    /**
20
     * @var string|\Closure
21
     */
22
    public $handler;
23
24
    /**
25
     * @var array
26
     */
27
    public $names;
28
29
    /**
30
     * @var array
31
     */
32
    public $vars;
33
34
    /**
35
     * @var RouterResponse
36
     */
37
    public $routerResponse;
38
39
    /**
40
     * RouterResponse setUp.
41
     */
42
    public function setUp()
43
    {
44
        $this->handler = 'handler';
45
        $this->code = 200;
46
        $this->names = ['name','name2'];
47
        $this->vars = ['a' => 1, 'b' =>2];
48
        $this->routerResponse = new RouterResponse($this->code, $this->handler, $this->names, $this->vars);
49
    }
50
51
    /**
52
     *
53
     */
54
    public function testGetStatusCode()
55
    {
56
        $this->assertEquals($this->code, $this->routerResponse->getStatusCode());
57
    }
58
59
    /**
60
     *
61
     */
62
    public function testGetHandler()
63
    {
64
        $this->assertEquals($this->handler, $this->routerResponse->getHandler());
65
    }
66
67
    /**
68
     *
69
     */
70
    public function testGetVars()
71
    {
72
        $this->assertEquals($this->vars, $this->routerResponse->getVars());
73
    }
74
75
    /**
76
     *
77
     */
78
    public function testGetNames()
79
    {
80
        $this->assertEquals($this->names, $this->routerResponse->getNames());
81
    }
82
}
83