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 ( 3a9ec1...3b9d90 )
by Christian
01:33
created

SongTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A testFromApi() 0 33 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\Song;
13
use PHPUnit\Framework\TestCase;
14
15
class SongTest extends TestCase
16
{
17
    public function testFromApi(): void
18
    {
19
        $data = <<<'EOD'
20
                    {
21
                        "name" : "Roll Over Beethoven",
22
                        "info": "This is a song",
23
                        "tape": 1,
24
                        "cover" : {
25
                           "mbid" : "592a3b6d-c42b-4567-99c9-ecf63bd66499",
26
                           "tmid" : 734540,
27
                           "name" : "Chuck Berry",
28
                           "sortName" : "Berry, Chuck",
29
                           "disambiguation" : "",
30
                           "url" : "https://www.setlist.fm/setlists/chuck-berry-63d6a2b7.html"
31
                        },
32
                        "with" : {
33
                           "mbid" : "b10bbbfc-cf9e-42e0-be17-e2c3e1d2600d",
34
                           "tmid" : 735610,
35
                           "name" : "The Beatles",
36
                           "sortName" : "Beatles, The",
37
                           "disambiguation" : "",
38
                           "url" : "https://www.setlist.fm/setlists/the-beatles-23d6a88b.html"
39
                       }
40
                    }
41
EOD;
42
43
        $song = Song::fromApi(json_decode($data, true));
44
        $this->assertSame('Roll Over Beethoven', $song->getName());
45
        $this->assertSame('This is a song', $song->getInfo());
46
        $this->assertNotNull($song->getCover());
47
        $this->assertNotNull($song->getFeaturings());
48
        $this->assertTrue($song->isTaped());
49
    }
50
}
51