Completed
Pull Request — master (#790)
by Guilherme
08:21 queued 04:10
created

GetDisconnectCallbackResponseEventTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
dl 0
loc 16
ccs 0
cts 10
cp 0
rs 10
c 0
b 0
f 0
wmc 1
1
<?php
2
/**
3
 * This file is part of the login-cidadao project or it's bundles.
4
 *
5
 * (c) Guilherme Donato <guilhermednt on github>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace PROCERGS\LoginCidadao\NfgBundle\Tests\Event;
12
13
use PHPUnit\Framework\TestCase;
14
use PROCERGS\LoginCidadao\NfgBundle\Event\GetDisconnectCallbackResponseEvent;
15
use Symfony\Component\HttpFoundation\Response;
16
17
class GetDisconnectCallbackResponseEventTest extends TestCase
18
{
19
    public function testEvent()
20
    {
21
        $personMeuRS = $this->createMock('PROCERGS\LoginCidadao\CoreBundle\Entity\PersonMeuRS');
22
        $response = $this->createMock('Symfony\Component\HttpFoundation\Response');
23
24
        $event = new GetDisconnectCallbackResponseEvent($personMeuRS, $response);
25
26
        $this->assertEquals($personMeuRS, $event->getPersonMeuRS());
27
        $this->assertEquals($response, $event->getResponse());
28
29
        $newResponse = new Response('content');
30
        $event->setResponse($newResponse);
31
32
        $this->assertEquals($newResponse, $event->getResponse());
33
    }
34
}
35