add invalid api function tests

This commit is contained in:
Dennis Eichhorn 2023-10-18 01:03:57 +00:00
parent 00b7801c9d
commit d5e42737f0

View File

@ -108,4 +108,24 @@ final class ApiControllerTest extends \PHPUnit\Framework\TestCase
self::assertGreaterThan(0, $response->getDataArray('')['response']->id);
}
public function testInvalidapiResourceCreate() : void
{
$response = new HttpResponse();
$request = new HttpRequest(new HttpUri(''));
$request->header->account = 1;
$this->module->apiResourceCreate($request, $response);
self::assertEquals(RequestStatusCode::R_400, $response->header->status);
}
public function testInvalidapiInformDelete() : void
{
$response = new HttpResponse();
$request = new HttpRequest(new HttpUri(''));
$request->header->account = 1;
$this->module->apiInformDelete($request, $response);
self::assertEquals(RequestStatusCode::R_400, $response->header->status);
}
}