Passed
Push — master ( 217db8...cecd6f )
by Woody
02:56
created

RouteTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 9
dl 0
loc 15
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A testConstructedWithMethodAndPatternAndHandler() 0 11 1
1
<?php
2
declare(strict_types=1);
3
4
namespace Northwoods\Router;
5
6
use PHPUnit\Framework\TestCase;
7
8
class RouteTest extends TestCase
9
{
10
    use CanMockHandler;
11
12
    public function testConstructedWithMethodAndPatternAndHandler(): void
13
    {
14
        $route = new Route(
15
            $method = 'GET',
16
            $pattern = '/',
17
            $handler = $this->mockHandler()
18
        );
19
20
        $this->assertEquals($method, $route->method());
21
        $this->assertEquals($pattern, $route->pattern());
22
        $this->assertEquals($handler, $route->handler());
23
    }
24
}
25