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

testConstructedWithMethodAndPatternAndHandler()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 7
dl 0
loc 11
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
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