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 ( dd5413...6f2a20 )
by
unknown
24s
created

CountryServiceTest::testSearch()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 23

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 23
rs 9.552
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\Service;
11
12
use Core23\SetlistFm\Connection\ConnectionInterface;
13
use Core23\SetlistFm\Service\CountryService;
14
use PHPUnit\Framework\TestCase;
15
16
final class CountryServiceTest extends TestCase
17
{
18
    private $connection;
19
20
    protected function setUp(): void
21
    {
22
        $this->connection =  $this->prophesize(ConnectionInterface::class);
23
    }
24
25
    public function testSearch(): void
26
    {
27
        $rawResponse = <<<'EOD'
28
                    {
29
                      "country" : [ {
30
                        "code" : "US",
31
                        "name" : "United States"
32
                      }],
33
                      "total" : 1,
34
                      "page" : 1,
35
                      "itemsPerPage" : 20
36
                    }
37
EOD;
38
39
        $this->connection->call('search/countries')
40
            ->willReturn(json_decode($rawResponse, true))
41
        ;
42
43
        $service = new CountryService($this->connection->reveal());
44
        $result  = $service->search();
45
46
        static::assertCount(1, $result->getResult());
47
    }
48
}
49