Passed
Pull Request — master (#9)
by Pavel
06:21
created

SecurityControllerTest::getKernelClass()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 1 Features 0
Metric Value
c 1
b 1
f 0
dl 0
loc 4
ccs 0
cts 2
cp 0
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 2
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()
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
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