for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
use Codeception\Test\Unit;
use veejay\jsonrpc\batch\Response;
use veejay\jsonrpc\tests\Api;
use veejay\jsonrpc\tests\ProtectedHelper;
class ApiTest extends Unit
{
public function testCall()
$api = new Api;
$code = ProtectedHelper::catchExceptionCode(function () use ($api) {
$api->withoutParams();
});
$this->assertEquals(0, $code);
$api->notExisted();
notExisted()
veejay\jsonrpc\tests\Api
__call
If this is a false-positive, you can also ignore this issue in your code via the ignore-call annotation
ignore-call
$api->/** @scrutinizer ignore-call */
notExisted();
$this->assertEquals(Response::METHOD_NOT_FOUND, $code);
}