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
Branch master (f137da)
by Dmitri
01:44
created

TokenTest   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 37
rs 10
c 0
b 0
f 0
wmc 3
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Damax\Bundle\ApiAuthBundle\Tests\Jwt;
6
7
use Damax\Bundle\ApiAuthBundle\Jwt\Token;
8
use PHPUnit\Framework\TestCase;
9
10
class TokenTest extends TestCase
11
{
12
    /**
13
     * @test
14
     */
15
    public function it_creates_from_claims()
16
    {
17
        $token = Token::fromClaims(['foo' => 'bar', 'baz' => 'qux']);
18
19
        $this->assertEquals(['foo' => 'bar', 'baz' => 'qux'], $token->all());
20
21
        return $token;
22
    }
23
24
    /**
25
     * @depends it_creates_from_claims
26
     *
27
     * @test
28
     */
29
    public function it_checks_claim_existence(Token $token)
30
    {
31
        $this->assertTrue($token->has('foo'));
32
        $this->assertTrue($token->has('baz'));
33
        $this->assertFalse($token->has('bar'));
34
    }
35
36
    /**
37
     * @depends it_creates_from_claims
38
     *
39
     * @test
40
     */
41
    public function it_retrieves_claim(Token $token)
42
    {
43
        $this->assertEquals('bar', $token->get('foo'));
44
        $this->assertEquals('qux', $token->get('baz'));
45
        $this->assertNull($token->get('abc'));
46
        $this->assertEquals('XYZ', $token->get('ABC', 'XYZ'));
47
    }
48
}
49