Make debugging test failures easier
This commit is contained in:
parent
9684456480
commit
eecd550c48
2 changed files with 49 additions and 0 deletions
|
@ -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.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue