Passed
Pull Request — master (#9)
by Pavel
12:36
created

SecurityControllerTest::testPublicAction()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 7

Duplication

Lines 12
Ratio 100 %

Code Coverage

Tests 9
CRAP Score 1

Importance

Changes 0
Metric Value
dl 12
loc 12
c 0
b 0
f 0
ccs 9
cts 9
cp 1
rs 9.4285
cc 1
eloc 7
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()
1 ignored issue
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
14 1
        $client->request(
15 1
            'POST',
16 1
            '/test/',
17 1
            ['method' => 'security/public']
18 1
        );
19
20 1
        self::assertTrue($client->getResponse()->isSuccessful());
21 1
    }
22
23
    /**
24
     * @expectedException \Symfony\Component\Security\Core\Exception\InsufficientAuthenticationException
25
     * @expectedExceptionMessage Full authentication is required to access this resource.
26
     */
27 1 View Code Duplication
    public function testPrivateAction()
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...
28
    {
29 1
        $client = self::createClient();
30
31 1
        $client->request(
32 1
            'POST',
33 1
            '/test/',
34 1
            ['method' => 'security/private']
35 1
        );
36
37
        self::assertTrue($client->getResponse()->isSuccessful());
38
    }
39
40
    protected static function getKernelClass()
41
    {
42
        return Kernel::class;
43
    }
44
}
45