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 ( 1978d2...e2f699 )
by William
03:55
created

RelationTest::canBeConstructedWithOnlyAnEmbed()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 10
rs 9.4286
cc 1
eloc 7
nc 1
nop 0
1
<?php
2
3
namespace Hateoas\Tests\Configuration;
4
5
use Hateoas\Tests\TestCase;
6
use Hateoas\Configuration\Relation;
7
8
class RelationTest extends TestCase
9
{
10
    public function testConstructor()
11
    {
12
        $relation = new Relation('self', 'user_get');
13
14
        $this->assertSame('self', $relation->getName());
15
        $this->assertSame('user_get', $relation->getHref());
16
        $this->assertEmpty($relation->getAttributes());
17
    }
18
19
    public function requireHrefOrEmbed()
20
    {
21
        $this
0 ignored issues
show
Bug introduced by
The method exception() does not exist on Hateoas\Tests\Configuration\RelationTest. Did you maybe mean getExpectedException()?

This check marks calls to methods that do not seem to exist on an object.

This is most likely the result of a method being renamed without all references to it being renamed likewise.

Loading history...
22
            ->exception(function () {
23
                new Relation('', null, null);
24
            })
25
            ->isInstanceOf('InvalidArgumentException')
26
            ->hasMessage('$href and $embedded cannot be both null.')
27
        ;
28
    }
29
30
    public function canBeConstructedWithOnlyAnEmbed()
31
    {
32
        $relation = new Relation('self', null, 'foo');
33
34
        $this->assertSame('self', $relation->getName());
35
        $this->assertNull($relation->getHref());
36
        $this->assertEmpty($relation->getAttributes());
37
        $this->assertInstanceOf('Hateoas\Configuration\Embed', $relation->getEmbedded());
38
        $this->assertSame('foo', $relation->getEmbedded()->getContent());
39
    }
40
}
41