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 ( f0acc7...5428b1 )
by Christian
07:08
created

StartAuthActionTest::testExecute()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 17

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 17
rs 9.7
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\LastFmBundle\Tests\Action;
11
12
use Core23\LastFm\Service\AuthServiceInterface;
13
use Core23\LastFmBundle\Action\StartAuthAction;
14
use PHPUnit\Framework\TestCase;
15
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
16
use Symfony\Component\Routing\RouterInterface;
17
18
class StartAuthActionTest extends TestCase
19
{
20
    private $authService;
21
22
    private $router;
23
24
    protected function setUp(): void
25
    {
26
        $this->authService = $this->prophesize(AuthServiceInterface::class);
27
        $this->router      = $this->prophesize(RouterInterface::class);
28
    }
29
30
    public function testExecute(): void
31
    {
32
        $this->router->generate('core23_lastfm_check', [], UrlGeneratorInterface::ABSOLUTE_URL)
33
            ->willReturn('/start')
34
        ;
35
36
        $this->authService->getAuthUrl('/start')
37
            ->willReturn('https://lastFm/login')
38
        ;
39
40
        $action = new StartAuthAction(
41
            $this->authService->reveal(),
42
            $this->router->reveal()
43
        );
44
45
        $this->assertSame('https://lastFm/login', $action()->getTargetUrl());
46
    }
47
}
48