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.

VndErrorRepresentationTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 47
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 4

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
lcom 1
cbo 4
dl 0
loc 47
c 1
b 0
f 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
B testSerialize() 0 44 1
1
<?php
2
3
namespace Hateoas\Tests\Representation;
4
5
use Hateoas\Configuration\Relation;
6
use Hateoas\Representation\VndErrorRepresentation;
7
8
class VndErrorRepresentationTest extends RepresentationTestCase
9
{
10
    public function testSerialize()
11
    {
12
        $error = new VndErrorRepresentation(
13
            'Validation failed',
14
            42,
15
            new Relation('help', 'http://.../', null, array('title' => 'Error Information')),
16
            new Relation('describes', 'http://.../', null, array('title' => 'Error Description'))
17
        );
18
19
        $this->assertSame(
20
            <<<XML
21
<?xml version="1.0" encoding="UTF-8"?>
22
<resource logref="42">
23
  <message><![CDATA[Validation failed]]></message>
24
  <link rel="help" href="http://.../" title="Error Information"/>
25
  <link rel="describes" href="http://.../" title="Error Description"/>
26
</resource>
27
28
XML
29
            ,
30
            $this->hateoas->serialize($error, 'xml')
31
        );
32
33
        $this->assertSame(
34
            <<<JSON
35
{
36
    "message": "Validation failed",
37
    "logref": 42,
38
    "_links": {
39
        "help": {
40
            "href": "http:\/\/...\/",
41
            "title": "Error Information"
42
        },
43
        "describes": {
44
            "href": "http:\/\/...\/",
45
            "title": "Error Description"
46
        }
47
    }
48
}
49
JSON
50
            ,
51
            $this->json($this->halHateoas->serialize($error, 'json'))
52
        );
53
    }
54
}
55