add invalid api function tests

This commit is contained in:
Dennis Eichhorn 2023-10-18 01:03:57 +00:00
parent 1c120ce0c8
commit 93b0075a90

View File

@ -248,4 +248,14 @@ final class ApiControllerTest extends \PHPUnit\Framework\TestCase
$this->module->apiChangeCommentVote($request, $response);
self::assertEquals($vId, $response->getDataArray('')['response']->id);
}
public function testInvalidapiCommentUpdate() : void
{
$response = new HttpResponse();
$request = new HttpRequest(new HttpUri(''));
$request->header->account = 1;
$this->module->apiCommentUpdate($request, $response);
self::assertEquals(RequestStatusCode::R_400, $response->header->status);
}
}