Issues (5)

tests/unit/ApiTest.php (1 issue)

Labels
Severity
1
<?php
2
3
use Codeception\Test\Unit;
4
use veejay\jsonrpc\batch\Response;
5
use veejay\jsonrpc\tests\Api;
6
use veejay\jsonrpc\tests\ProtectedHelper;
7
8
class ApiTest extends Unit
9
{
10
    public function testCall()
11
    {
12
        $api = new Api;
13
14
        $code = ProtectedHelper::catchExceptionCode(function () use ($api) {
15
            $api->withoutParams();
16
        });
17
        $this->assertEquals(0, $code);
18
19
        $code = ProtectedHelper::catchExceptionCode(function () use ($api) {
20
            $api->notExisted();
0 ignored issues
show
The method notExisted() does not exist on veejay\jsonrpc\tests\Api. Since you implemented __call, consider adding a @method annotation. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

20
            $api->/** @scrutinizer ignore-call */ 
21
                  notExisted();
Loading history...
21
        });
22
        $this->assertEquals(Response::METHOD_NOT_FOUND, $code);
23
    }
24
}
25