added unit tests
This commit is contained in:
20
tests/Support/JsonErrorResponse.php
Normal file
20
tests/Support/JsonErrorResponse.php
Normal file
@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Tests\Support;
|
||||
|
||||
use RuntimeException;
|
||||
|
||||
/** Thrown instead of exit() when QDB_TESTING is defined. */
|
||||
final class JsonErrorResponse extends RuntimeException
|
||||
{
|
||||
public function __construct(
|
||||
public readonly string $errorCode,
|
||||
public readonly string $errorMessage,
|
||||
public readonly int $httpStatus = 400,
|
||||
public readonly mixed $details = null,
|
||||
) {
|
||||
parent::__construct($errorMessage, $httpStatus);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user