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 ( fc38fb...ac880e )
by Christian
05:32
created

AuthSuccessEventTest::testGetResponse()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 9
rs 9.9666
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\FacebookBundle\Tests\Event;
11
12
use Core23\FacebookBundle\Event\AuthSuccessEvent;
13
use Core23\FacebookBundle\Session\SessionInterface;
14
use PHPUnit\Framework\MockObject\MockObject;
15
use PHPUnit\Framework\TestCase;
16
use Prophecy\Prophecy\ObjectProphecy;
17
use Symfony\Component\EventDispatcher\Event;
18
use Symfony\Component\HttpFoundation\Response;
19
20
class AuthSuccessEventTest extends TestCase
21
{
22
    public function testCreation(): void
23
    {
24
        /** @var ObjectProphecy&SessionInterface $session */
0 ignored issues
show
Documentation introduced by
The doc-type ObjectProphecy&SessionInterface could not be parsed: Unknown type name "ObjectProphecy&SessionInterface" at position 0. (view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
25
        $session = $this->prophesize(SessionInterface::class);
26
27
        $event = new AuthSuccessEvent($session->reveal());
28
29
        $this->assertInstanceOf(Event::class, $event);
30
    }
31
32
    public function testGetUsername(): void
33
    {
34
        /** @var ObjectProphecy&SessionInterface $session */
0 ignored issues
show
Documentation introduced by
The doc-type ObjectProphecy&SessionInterface could not be parsed: Unknown type name "ObjectProphecy&SessionInterface" at position 0. (view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
35
        $session = $this->prophesize(SessionInterface::class);
36
        $session->getName()->willReturn('MyUser');
37
38
        $event = new AuthSuccessEvent($session->reveal());
39
40
        $this->assertSame('MyUser', $event->getUsername());
41
    }
42
43
    public function testGetSession(): void
44
    {
45
        /** @var ObjectProphecy&SessionInterface $session */
0 ignored issues
show
Documentation introduced by
The doc-type ObjectProphecy&SessionInterface could not be parsed: Unknown type name "ObjectProphecy&SessionInterface" at position 0. (view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
46
        $session = $this->prophesize(SessionInterface::class);
47
48
        $event = new AuthSuccessEvent($session->reveal());
49
50
        $this->assertSame($session->reveal(), $event->getSession());
51
    }
52
53
    public function testGetResponse(): void
54
    {
55
        /** @var ObjectProphecy&SessionInterface $session */
0 ignored issues
show
Documentation introduced by
The doc-type ObjectProphecy&SessionInterface could not be parsed: Unknown type name "ObjectProphecy&SessionInterface" at position 0. (view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
56
        $session = $this->prophesize(SessionInterface::class);
57
58
        $event = new AuthSuccessEvent($session->reveal());
59
60
        $this->assertNull($event->getResponse());
61
    }
62
63
    public function testSetResponse(): void
64
    {
65
        /** @var ObjectProphecy&SessionInterface $session */
0 ignored issues
show
Documentation introduced by
The doc-type ObjectProphecy&SessionInterface could not be parsed: Unknown type name "ObjectProphecy&SessionInterface" at position 0. (view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
66
        $session = $this->prophesize(SessionInterface::class);
67
68
        /** @var MockObject&Response $session */
0 ignored issues
show
Documentation introduced by
The doc-type MockObject&Response could not be parsed: Unknown type name "MockObject&Response" at position 0. (view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
69
        $reponse = $this->prophesize(Response::class);
70
71
        $event = new AuthSuccessEvent($session->reveal());
72
        $event->setResponse($reponse->reveal());
73
74
        $this->assertSame($reponse->reveal(), $event->getResponse());
75
    }
76
}
77