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.

testCollectionWithDefaultResourceKey()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8

Duplication

Lines 8
Ratio 100 %

Importance

Changes 0
Metric Value
dl 8
loc 8
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace EllipseSynergie\ApiResponse\Tests\Serializer;
4
5
use EllipseSynergie\ApiResponse\Serializer\Serializer;
6
use PHPUnit_Framework_TestCase;
7
8
/**
9
 * Class SerializerTest
10
 * @package EllipseSynergie\ApiResponse\Tests\Serializer
11
 * @author Maxime Beaudoin <[email protected]>
12
 */
13
class SerializerTest extends PHPUnit_Framework_TestCase
14
{
15 View Code Duplication
    public function testCollectionWithDefaultResourceKey()
16
    {
17
        $data = ['foo'];
18
        $serializer = new Serializer();
19
        $result = $serializer->collection(null, $data);
20
21
        $this->assertSame(['data' => $data], $result);
22
    }
23
24 View Code Duplication
    public function testCollectionWithCustomResourceKey()
25
    {
26
        $data = ['foo'];
27
        $serializer = new Serializer();
28
        $result = $serializer->collection('custom', $data);
29
30
        $this->assertSame(['custom' => $data], $result);
31
    }
32
33 View Code Duplication
    public function testCollectionWithOptionalResourceKey()
34
    {
35
        $data = ['foo'];
36
        $serializer = new OptionalKeySerializer();
37
        $result = $serializer->collection(null, $data);
38
39
        $this->assertSame($data, $result);
40
41
        $result = $serializer->collection('optional', $data);
42
43
        $this->assertSame(['optional' => $data], $result);
44
    }
45
46 View Code Duplication
    public function testItemWithDefaultResourceKey()
47
    {
48
        $data = ['foo'];
49
        $serializer = new Serializer();
50
        $result = $serializer->item(null, $data);
51
52
        $this->assertSame(['data' => $data], $result);
53
    }
54
55 View Code Duplication
    public function testItemWithCustomResourceKey()
56
    {
57
        $data = ['foo'];
58
        $serializer = new Serializer();
59
        $result = $serializer->collection('custom', $data);
60
61
        $this->assertSame(['custom' => $data], $result);
62
    }
63
64 View Code Duplication
    public function testItemWithOptionalResourceKey()
65
    {
66
        $data = ['foo'];
67
        $serializer = new OptionalKeySerializer();
68
        $result = $serializer->item(null, $data);
69
70
        $this->assertSame($data, $result);
71
72
        $result = $serializer->item('optional', $data);
73
74
        $this->assertSame(['optional' => $data], $result);
75
    }
76
}
77