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.
Completed
Push — master ( 4c4ab9...532c3a )
by Benjamin
03:44
created

ApplicationTest::setUp()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 17
Code Lines 13

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 13
nc 1
nop 0
dl 0
loc 17
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
namespace Tests;
4
5
use App\Application;
6
use App\Lib\Http\Request;
7
use App\Lib\Routing\Router;
8
use GuzzleHttp\Psr7\Response;
9
use PHPUnit\Framework\TestCase;
10
11
class ApplicationTest extends TestCase
12
{
13
    protected $app;
14
15
    /* @var PHPUnit_Framework_MockObject_MockObject */
0 ignored issues
show
Bug introduced by
The type Tests\PHPUnit_Framework_MockObject_MockObject was not found. Did you mean PHPUnit_Framework_MockObject_MockObject? If so, make sure to prefix the type with \.
Loading history...
16
    protected $router;
17
18
    public function setUp()
19
    {
20
        $this->router = $this
0 ignored issues
show
Documentation Bug introduced by
It seems like $this->getMockBuilder(Ap...ay('route'))->getMock() of type PHPUnit\Framework\MockObject\MockObject is incompatible with the declared type Tests\PHPUnit_Framework_MockObject_MockObject of property $router.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
21
            ->getMockBuilder(Router::class)
22
            ->disableOriginalConstructor()
23
            ->disableOriginalClone()
24
            ->disableArgumentCloning()
25
            ->disallowMockingUnknownTypes()
26
            ->setMethods(['route'])
27
            ->getMock();
28
29
        $this->router
30
             ->expects($this->once())
31
             ->method('route')
32
             ->willReturn(['controller' => 'Default', 'action' => 'notFound', 'params' => []]);
33
34
        $this->app = new Application($this->router);
35
    }
36
37
    public function testRouterIsCalled()
38
    {
39
        $this->app->handleRequest(new Request());
40
    }
41
42
    public function testHandleRequestReturnsResponse()
43
    {
44
        $return = $this->app->handleRequest(new Request());
45
        $this->assertInstanceOf(Response::class, $return);
46
    }
47
}
48