This commit is contained in:
14
lib/QdbHttpResponse.php
Normal file
14
lib/QdbHttpResponse.php
Normal file
@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Thrown instead of exit() when QDB_TESTING is enabled (PHPUnit integration tests).
|
||||
*/
|
||||
final class QdbHttpResponse extends Exception
|
||||
{
|
||||
public function __construct(
|
||||
public readonly array $body,
|
||||
public readonly int $status,
|
||||
) {
|
||||
parent::__construct(json_encode($body, JSON_THROW_ON_ERROR), $status);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user