Test Failed
Pull Request — master (#11)
by Pavel
07:46
created

SecurityTest::testPublicMethodRequest()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 0
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