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.

RouterTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 17
dl 0
loc 25
rs 10
c 0
b 0
f 0
wmc 1

1 Method

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