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 ( dd680f...a61514 )
by Christian
01:32
created

ArtistTest::testFromApi()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 21

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 21
rs 9.584
c 0
b 0
f 0
cc 1
nc 1
nop 0
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\Artist;
13
use PHPUnit\Framework\TestCase;
14
15
class ArtistTest extends TestCase
16
{
17
    public function testFromApi(): void
18
    {
19
        $data = <<<'EOD'
20
                {
21
                  "mbid" : "b10bbbfc-cf9e-42e0-be17-e2c3e1d2600d",
22
                  "tmid" : 735610,
23
                  "name" : "The Beatles",
24
                  "sortName" : "Beatles, The",
25
                  "disambiguation" : "John, Paul, George and Ringo",
26
                  "url" : "https://www.setlist.fm/setlists/the-beatles-23d6a88b.html"
27
                }
28
EOD;
29
30
        $artist = Artist::fromApi(json_decode($data, true));
31
        $this->assertSame('The Beatles', $artist->getName());
32
        $this->assertSame('Beatles, The', $artist->getSortName());
33
        $this->assertSame('John, Paul, George and Ringo', $artist->getDisambiguation());
34
        $this->assertSame('b10bbbfc-cf9e-42e0-be17-e2c3e1d2600d', $artist->getMbid());
35
        $this->assertSame(735610, $artist->getTmid());
36
        $this->assertSame('https://www.setlist.fm/setlists/the-beatles-23d6a88b.html', $artist->getUrl());
37
    }
38
}
39