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 ( 5cefd1...492078 )
by Anton
04:08
created

ServerRequestTest   A

Complexity

Total Complexity 10

Size/Duplication

Total Lines 79
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 30
c 1
b 0
f 0
dl 0
loc 79
rs 10
wmc 10

10 Methods

Rating   Name   Duplication   Size   Complexity  
A testWithoutAttribute() 0 9 1
A testWithQueryParams() 0 6 1
A setUp() 0 3 1
A testWithParsedBody() 0 6 1
A testGetAttribute() 0 6 1
A testWithAttribute() 0 6 1
A testWithCookieParams() 0 6 1
A testWithUploadedFiles() 0 6 1
A testGetNoAttributes() 0 3 1
A testGetDefaultAttribute() 0 6 1
1
<?php
2
3
use RingCentral\Psr7\ServerRequest;
4
5
class ServerRequestTest extends \PHPUnit_Framework_TestCase
0 ignored issues
show
Bug introduced by
The type PHPUnit_Framework_TestCase was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
6
{
7
    private $request;
8
9
    public function setUp()
10
    {
11
        $this->request = new ServerRequest('GET', 'http://localhost');
12
    }
13
14
    public function testGetNoAttributes()
15
    {
16
        $this->assertEquals(array(), $this->request->getAttributes());
17
    }
18
19
    public function testWithAttribute()
20
    {
21
        $request = $this->request->withAttribute('hello', 'world');
22
23
        $this->assertNotSame($request, $this->request);
24
        $this->assertEquals(array('hello' => 'world'), $request->getAttributes());
25
    }
26
27
    public function testGetAttribute()
28
    {
29
        $request = $this->request->withAttribute('hello', 'world');
30
31
        $this->assertNotSame($request, $this->request);
32
        $this->assertEquals('world', $request->getAttribute('hello'));
33
    }
34
35
    public function testGetDefaultAttribute()
36
    {
37
        $request = $this->request->withAttribute('hello', 'world');
38
39
        $this->assertNotSame($request, $this->request);
40
        $this->assertEquals(null, $request->getAttribute('hi', null));
41
    }
42
43
    public function testWithoutAttribute()
44
    {
45
        $request = $this->request->withAttribute('hello', 'world');
46
        $request = $request->withAttribute('test', 'nice');
47
48
        $request = $request->withoutAttribute('hello');
49
50
        $this->assertNotSame($request, $this->request);
51
        $this->assertEquals(array('test' => 'nice'), $request->getAttributes());
52
    }
53
54
    public function testWithCookieParams()
55
    {
56
        $request = $this->request->withCookieParams(array('test' => 'world'));
57
58
        $this->assertNotSame($request, $this->request);
59
        $this->assertEquals(array('test' => 'world'), $request->getCookieParams());
60
    }
61
62
    public function testWithQueryParams()
63
    {
64
        $request = $this->request->withQueryParams(array('test' => 'world'));
65
66
        $this->assertNotSame($request, $this->request);
67
        $this->assertEquals(array('test' => 'world'), $request->getQueryParams());
68
    }
69
70
    public function testWithUploadedFiles()
71
    {
72
        $request = $this->request->withUploadedFiles(array('test' => 'world'));
73
74
        $this->assertNotSame($request, $this->request);
75
        $this->assertEquals(array('test' => 'world'), $request->getUploadedFiles());
76
    }
77
78
    public function testWithParsedBody()
79
    {
80
        $request = $this->request->withParsedBody(array('test' => 'world'));
81
82
        $this->assertNotSame($request, $this->request);
83
        $this->assertEquals(array('test' => 'world'), $request->getParsedBody());
84
    }
85
}
86