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.

SymfonyUrlGeneratorTest::test()   B
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 24
Code Lines 15

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 24
c 0
b 0
f 0
rs 8.9713
cc 2
eloc 15
nc 2
nop 0
1
<?php
2
3
namespace Hateoas\Tests\UrlGenerator;
4
5
use Hateoas\Tests\TestCase;
6
use Hateoas\UrlGenerator\SymfonyUrlGenerator;
7
8
class SymfonyUrlGeneratorTest extends TestCase
9
{
10
    public function test()
11
    {
12
        $name           = 'user_get';
13
        $parameters     = array('id' => 42);
14
        $absolute       = true;
15
        $expectedResult = '/users/42';
16
17
        if (\Symfony\Component\Routing\Generator\UrlGeneratorInterface::ABSOLUTE_PATH === 1) {
18
            $absolute = \Symfony\Component\Routing\Generator\UrlGeneratorInterface::ABSOLUTE_URL;
19
        }
20
21
        $symfonyUrlGeneratorProphecy = $this->prophesize('Symfony\Component\Routing\Generator\UrlGeneratorInterface');
22
        $symfonyUrlGeneratorProphecy
23
            ->generate($name, $parameters, $absolute)
24
            ->willReturn($expectedResult)
25
        ;
26
27
        $urlGenerator = new SymfonyUrlGenerator($symfonyUrlGeneratorProphecy->reveal());
28
29
        $this->assertSame(
30
            $expectedResult,
31
            $urlGenerator->generate($name, $parameters, $absolute)
32
        );
33
    }
34
}
35