ParamsListServiceTest::testGetRouteId()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
c 1
b 0
f 0
dl 0
loc 6
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
/*
4
 * This file is part of the SF Forward Bundle.
5
 *
6
 * (c) DAOUDI Soufian <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace SfForward\Tests\Util;
13
14
use SfForward\Util\ParamsListService;
15
use PHPUnit\Framework\TestCase;
16
17
/**
18
 * Class ParamsListServiceTest.
19
 */
20
class ParamsListServiceTest extends TestCase
21
{
22
    /**
23
     * Test getServiceName Method.
24
     */
25
    public function testGetServiceName()
26
    {
27
        $paramsList = 'service=UM&routeId=_cinema_film_2174';
28
        $paramsListService = new ParamsListService($paramsList);
29
30
        $this->assertEquals('u_m', $paramsListService->getServiceName());
31
    }
32
33
    /**
34
     * Test getRouteId Method.
35
     */
36
    public function testGetRouteId()
37
    {
38
        $paramsList = 'service=UM&routeId=_cinema_film_2174';
39
        $paramsListService = new ParamsListService($paramsList);
40
41
        $this->assertEquals('/cinema/film/2174', $paramsListService->getRouteId());
42
    }
43
}
44