Total Complexity | 3 |
Total Lines | 36 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
11 | class LiteralTest extends \Nip\Router\Tests\AbstractTest |
||
12 | { |
||
13 | |||
14 | /** |
||
15 | * @var Literal |
||
16 | */ |
||
17 | protected $object; |
||
18 | |||
19 | /** |
||
20 | * Sets up the fixture, for example, opens a network connection. |
||
21 | * This method is called before a test is executed. |
||
22 | */ |
||
23 | protected function setUp() : void |
||
24 | { |
||
25 | $this->object = new Literal(); |
||
26 | } |
||
27 | |||
28 | public function testAssemble() |
||
29 | { |
||
30 | $params = [ |
||
31 | 'url' => 'lorem', |
||
32 | 'name' => 'ipsum', |
||
33 | 'company' => 'dolo&rem', |
||
34 | ]; |
||
35 | static::assertEquals('?url=lorem&name=ipsum&company=dolo%26rem', $this->object->assemble($params)); |
||
36 | |||
37 | $this->object->setMap('shop/cart'); |
||
|
|||
38 | static::assertEquals('shop/cart?url=lorem&name=ipsum&company=dolo%26rem', $this->object->assemble($params)); |
||
39 | } |
||
40 | |||
41 | public function testMatch() |
||
47 | } |
||
48 | } |
||
49 |