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

SecurityControllerTest::testPrivateAction()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1.037

Importance

Changes 1
Bugs 1 Features 0
Metric Value
c 1
b 1
f 0
dl 0
loc 4
ccs 2
cts 3
cp 0.6667
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 1.037
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