Test Failed
Pull Request — master (#11)
by Pavel
23:42
created

SecurityTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 3
dl 0
loc 17
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testPrivateMethodRequest() 0 7 1
A testPublicMethodRequest() 0 6 1
1
<?php
2
3
namespace Bankiru\Api\JsonRpc\Test\Tests;
4
5
use Bankiru\Api\Rpc\Test\Impl\Request;
6
use ScayTrase\Api\JsonRpc\JsonRpcError;
7
8
final class SecurityTest extends JsonRpcTestCase
9
{
10
    public function testPrivateMethodRequest()
11
    {
12
        $response = $this->sendJsonRpcRequest(new Request('prefix/security/private', []), '/test/');
13
14
        self::assertFalse($response->isSuccessful());
15
        self::assertEquals($response->getError()->getCode(), JsonRpcError::METHOD_NOT_FOUND);
16
    }
17
18
    public function testPublicMethodRequest()
19
    {
20
        $response = $this->sendJsonRpcRequest(new Request('prefix/security/public', []), '/test/');
21
22
        self::assertTrue($response->isSuccessful(), json_encode($response, JSON_PRETTY_PRINT));
23
    }
24
}
25