From 4a27e56e08b1f9734964652a3536aba6f43695a8 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Sun, 26 Jul 2020 10:55:30 -0700 Subject: [PATCH] Fix test --- .../Integration/Api/Client/Server/CommandControllerTest.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/Integration/Api/Client/Server/CommandControllerTest.php b/tests/Integration/Api/Client/Server/CommandControllerTest.php index 3d7cd090f..de3dacc85 100644 --- a/tests/Integration/Api/Client/Server/CommandControllerTest.php +++ b/tests/Integration/Api/Client/Server/CommandControllerTest.php @@ -9,6 +9,7 @@ use Pterodactyl\Models\Permission; use GuzzleHttp\Exception\BadResponseException; use GuzzleHttp\Psr7\Response as GuzzleResponse; use Pterodactyl\Repositories\Wings\DaemonCommandRepository; +use Pterodactyl\Exceptions\Http\Connection\DaemonConnectionException; use Pterodactyl\Tests\Integration\Api\Client\ClientApiIntegrationTestCase; class CommandControllerTest extends ClientApiIntegrationTestCase @@ -86,7 +87,9 @@ class CommandControllerTest extends ClientApiIntegrationTestCase [$user, $server] = $this->generateTestAccount(); $this->repository->expects('setServer->send')->andThrows( - new BadResponseException('', new Request('GET', 'test'), new GuzzleResponse(Response::HTTP_BAD_GATEWAY)) + new DaemonConnectionException( + new BadResponseException('', new Request('GET', 'test'), new GuzzleResponse(Response::HTTP_BAD_GATEWAY)) + ) ); $response = $this->actingAs($user)->postJson("/api/client/servers/{$server->uuid}/command", [