added unit tests
This commit is contained in:
22
tests/Support/RawHttpResponse.php
Normal file
22
tests/Support/RawHttpResponse.php
Normal file
@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Tests\Support;
|
||||
|
||||
use RuntimeException;
|
||||
|
||||
/** Thrown instead of exit() for file/download responses when QDB_TESTING is defined. */
|
||||
final class RawHttpResponse extends RuntimeException
|
||||
{
|
||||
/**
|
||||
* @param array<string, string> $headers
|
||||
*/
|
||||
public function __construct(
|
||||
public readonly string $body,
|
||||
public readonly array $headers,
|
||||
public readonly int $httpStatus = 200,
|
||||
) {
|
||||
parent::__construct('Raw HTTP response', $httpStatus);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user