mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-28 17:02:04 +03:00
Added testing coverage to API token auth
This commit is contained in:
16
tests/TestsApi.php
Normal file
16
tests/TestsApi.php
Normal file
@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
namespace Tests;
|
||||
|
||||
trait TestsApi
|
||||
{
|
||||
|
||||
protected $apiTokenId = 'apitoken';
|
||||
protected $apiTokenSecret = 'password';
|
||||
|
||||
protected function errorResponse(string $messge, int $code)
|
||||
{
|
||||
return ["error" => ["code" => $code, "message" => $messge]];
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user