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.

ArtistInfoBuilderTest::testAutocorrect()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 12

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 12
rs 9.8666
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\LastFm\Tests\Builder;
11
12
use Core23\LastFm\Builder\ArtistInfoBuilder;
13
use PHPUnit\Framework\TestCase;
14
15
final class ArtistInfoBuilderTest extends TestCase
16
{
17
    public function testForMbid(): void
18
    {
19
        $builder = ArtistInfoBuilder::forMbid('a466c2a2-6517-42fb-a160-1087c3bafd9f');
20
21
        $expected = [
22
            'mbid' => 'a466c2a2-6517-42fb-a160-1087c3bafd9f',
23
        ];
24
        static::assertSame($expected, $builder->getQuery());
25
    }
26
27
    public function testForArtist(): void
28
    {
29
        $builder = ArtistInfoBuilder::forArtist('Slipknot');
30
31
        $expected = [
32
            'artist' => 'Slipknot',
33
        ];
34
        static::assertSame($expected, $builder->getQuery());
35
    }
36
37
    public function testForUsername(): void
38
    {
39
        $builder = ArtistInfoBuilder::forMbid('a466c2a2-6517-42fb-a160-1087c3bafd9f')
40
            ->forUsername('MyUser')
41
        ;
42
43
        $expected = [
44
            'mbid'     => 'a466c2a2-6517-42fb-a160-1087c3bafd9f',
45
            'username' => 'MyUser',
46
        ];
47
        static::assertSame($expected, $builder->getQuery());
48
    }
49
50
    public function testLanguage(): void
51
    {
52
        $builder = ArtistInfoBuilder::forMbid('a466c2a2-6517-42fb-a160-1087c3bafd9f')
53
            ->language('DE')
54
        ;
55
56
        $expected = [
57
            'mbid' => 'a466c2a2-6517-42fb-a160-1087c3bafd9f',
58
            'lang' => 'DE',
59
        ];
60
        static::assertSame($expected, $builder->getQuery());
61
    }
62
63
    public function testAutocorrect(): void
64
    {
65
        $builder = ArtistInfoBuilder::forMbid('a466c2a2-6517-42fb-a160-1087c3bafd9f')
66
            ->autocorrect(true)
67
        ;
68
69
        $expected = [
70
            'mbid'        => 'a466c2a2-6517-42fb-a160-1087c3bafd9f',
71
            'autocorrect' => 1,
72
        ];
73
        static::assertSame($expected, $builder->getQuery());
74
    }
75
76
    public function testNoAutocorrect(): void
77
    {
78
        $builder = ArtistInfoBuilder::forMbid('a466c2a2-6517-42fb-a160-1087c3bafd9f')
79
            ->autocorrect(false)
80
        ;
81
82
        $expected = [
83
            'mbid'        => 'a466c2a2-6517-42fb-a160-1087c3bafd9f',
84
            'autocorrect' => 0,
85
        ];
86
        static::assertSame($expected, $builder->getQuery());
87
    }
88
}
89