RouteTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 17
c 2
b 0
f 0
dl 0
loc 23
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A testConstruct() 0 21 1
1
<?php
2
class RouteTest extends \PHPUnit\Framework\TestCase
3
{
4
    public function testConstruct()
5
    {
6
        $name = 'myRoute';
7
        $method = 'any';
8
        $path = '/test-uri';
9
        $request = new Suricate\Request();
10
        $routeTarget = 'myController::myMethod';
11
        $parametersDefinitions = [];
12
        $middleware = null;
13
14
        $route = new Suricate\Route(
15
            $name,
16
            $method,
17
            $path,
18
            $request,
19
            $routeTarget,
20
            $parametersDefinitions,
21
            $middleware
22
        );
23
24
        $this->assertEquals($path, $route->getPath());
25
    }
26
}
27