mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-19 06:43:45 +02:00
Make debugging test failures easier
This commit is contained in:
@@ -15,6 +15,7 @@ use Pterodactyl\Models\Location;
|
||||
use Pterodactyl\Models\Schedule;
|
||||
use Illuminate\Support\Collection;
|
||||
use Pterodactyl\Models\Allocation;
|
||||
use Pterodactyl\Tests\Integration\TestResponse;
|
||||
use Pterodactyl\Tests\Integration\IntegrationTestCase;
|
||||
use Pterodactyl\Transformers\Api\Client\BaseClientTransformer;
|
||||
|
||||
@@ -44,6 +45,19 @@ abstract class ClientApiIntegrationTestCase extends IntegrationTestCase
|
||||
CarbonImmutable::setTestNow(Carbon::now());
|
||||
}
|
||||
|
||||
/**
|
||||
* Override the default createTestResponse from Illuminate so that we can
|
||||
* just dump 500-level errors to the screen in the tests without having
|
||||
* to keep re-assigning variables.
|
||||
*
|
||||
* @param \Illuminate\Http\Response $response
|
||||
* @return \Illuminate\Testing\TestResponse
|
||||
*/
|
||||
protected function createTestResponse($response)
|
||||
{
|
||||
return TestResponse::fromBaseResponse($response);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a link to the specific resource using the client API.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user