GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Passed
Push — master ( d17020...f00db0 )
by Benjamin
02:43
created

RouterTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 29
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
B testMatcherIsCalled() 0 27 1
1
<?php
2
3
namespace Tests\Lib\Routing;
4
5
use Lib\Http\Request;
6
use Lib\Routing\RouteLoader;
7
use Lib\Routing\Router;
8
use Lib\Routing\UrlMatcher;
9
use PHPUnit\Framework\TestCase;
10
use PHPUnit\Framework\MockObject\MockObject;
11
12
class RouterTest extends TestCase
13
{
14
    public function testMatcherIsCalled()
15
    {
16
        /**
17
         * @var UrlMatcher&MockObject
18
         */
19
        $matcher = $this
20
            ->getMockBuilder(UrlMatcher::class)
21
            ->disableOriginalConstructor()
22
            ->disableOriginalClone()
23
            ->disallowMockingUnknownTypes()
24
            ->setMethods(['match'])
25
            ->getMock();
26
        /**
27
         * @var RouteLoader&MockObject
28
         */
29
        $loader = $this
30
            ->getMockBuilder(RouteLoader::class)
31
            ->disableOriginalConstructor()
32
            ->disableOriginalClone()
33
            ->disallowMockingUnknownTypes()
34
            ->getMock();
35
36
        $router = new Router($loader, $matcher);
37
38
        $matcher->expects($this->once())->method('match');
39
40
        $router->route(new Request());
41
    }
42
}
43