Skip to content

Commit 4a27e56

Browse files
committed
Fix test
1 parent f0ac072 commit 4a27e56

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/Integration/Api/Client/Server/CommandControllerTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
use GuzzleHttp\Exception\BadResponseException;
1010
use GuzzleHttp\Psr7\Response as GuzzleResponse;
1111
use Pterodactyl\Repositories\Wings\DaemonCommandRepository;
12+
use Pterodactyl\Exceptions\Http\Connection\DaemonConnectionException;
1213
use Pterodactyl\Tests\Integration\Api\Client\ClientApiIntegrationTestCase;
1314

1415
class CommandControllerTest extends ClientApiIntegrationTestCase
@@ -86,7 +87,9 @@ public function testErrorIsReturnedWhenServerIsOffline()
8687
[$user, $server] = $this->generateTestAccount();
8788

8889
$this->repository->expects('setServer->send')->andThrows(
89-
new BadResponseException('', new Request('GET', 'test'), new GuzzleResponse(Response::HTTP_BAD_GATEWAY))
90+
new DaemonConnectionException(
91+
new BadResponseException('', new Request('GET', 'test'), new GuzzleResponse(Response::HTTP_BAD_GATEWAY))
92+
)
9093
);
9194

9295
$response = $this->actingAs($user)->postJson("/api/client/servers/{$server->uuid}/command", [

0 commit comments

Comments
 (0)