Passed
Pull Request — master (#9)
by Pavel
11:27
created

SecurityControllerTest::testPublicAction()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 7
Ratio 100 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 1
Bugs 1 Features 0
Metric Value
c 1
b 1
f 0
dl 7
loc 7
ccs 5
cts 5
cp 1
rs 9.4285
cc 1
eloc 4
nc 1
nop 0
crap 1
1
<?php
2
3
namespace Bankiru\Api\Rpc\Test\Tests;
4
5
use Bankiru\Api\Rpc\Test\Kernel;
6
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
7
8
final class SecurityControllerTest extends WebTestCase
9
{
10 1 View Code Duplication
    public function testPublicAction()
11
    {
12 1
        $client = self::createClient();
13 1
        $client->request('POST', '/test/', ['method' => 'security/public']);
14
15 1
        self::assertTrue($client->getResponse()->isSuccessful());
16 1
    }
17
18
    /**
19
     * @expectedException \Symfony\Component\Security\Core\Exception\InsufficientAuthenticationException
20
     * @expectedExceptionMessage Full authentication is required to access this resource.
21
     */
22 1
    public function testPrivateAction()
23
    {
24 1
        self::createClient()->request('POST', '/test/', ['method' => 'security/private']);
25
    }
26
27
    protected static function getKernelClass()
28
    {
29
        return Kernel::class;
30
    }
31
}
32