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 ( 3b9d90...0b12c2 )
by Christian
02:41 queued 01:12
created

UserTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 22
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A testFromApi() 0 19 1
1
<?php
2
3
/*
4
 * (c) Christian Gripp <[email protected]>
5
 *
6
 * For the full copyright and license information, please view the LICENSE
7
 * file that was distributed with this source code.
8
 */
9
10
namespace Core23\SetlistFm\Tests\Model;
11
12
use Core23\SetlistFm\Model\User;
13
use PHPUnit\Framework\TestCase;
14
15
class UserTest extends TestCase
16
{
17
    public function testFromApi(): void
18
    {
19
        $data = <<<'EOD'
20
                    {
21
                      "userId": "Metal-42",
22
                      "fullname": "Max",
23
                      "about": "Some dummy text",
24
                      "website": "http://example.com",
25
                      "url": "https://www.setlist.fm/user/Metal-42"
26
                    }
27
EOD;
28
29
        $user = User::fromApi(json_decode($data, true));
30
        $this->assertSame('Metal-42', $user->getId());
31
        $this->assertSame('Some dummy text', $user->getAbout());
32
        $this->assertSame('Max', $user->getFullname());
33
        $this->assertSame('http://example.com', $user->getWebsite());
34
        $this->assertSame('https://www.setlist.fm/user/Metal-42', $user->getUrl());
35
    }
36
}
37