Update to Laravel 8
Co-authored-by: Matthew Penner <me@matthewp.io>
This commit is contained in:
parent
028921b42a
commit
a043071e3c
211 changed files with 4394 additions and 2933 deletions
|
@ -6,6 +6,7 @@ use Mockery;
|
|||
use Exception;
|
||||
use GuzzleHttp\Psr7\Request;
|
||||
use GuzzleHttp\Psr7\Response;
|
||||
use Pterodactyl\Models\Server;
|
||||
use Pterodactyl\Models\Database;
|
||||
use Pterodactyl\Models\DatabaseHost;
|
||||
use GuzzleHttp\Exception\BadResponseException;
|
||||
|
@ -65,7 +66,7 @@ class ServerDeletionServiceTest extends IntegrationTestCase
|
|||
$this->expectException(DaemonConnectionException::class);
|
||||
|
||||
$this->daemonServerRepository->expects('setServer->delete')->withNoArgs()->andThrows(
|
||||
new DaemonConnectionException(new BadResponseException('Bad request', new Request('GET', '/test')))
|
||||
new DaemonConnectionException(new BadResponseException('Bad request', new Request('GET', '/test'), new Response))
|
||||
);
|
||||
|
||||
$this->getService()->handle($server);
|
||||
|
@ -113,10 +114,10 @@ class ServerDeletionServiceTest extends IntegrationTestCase
|
|||
public function testExceptionWhileDeletingStopsProcess()
|
||||
{
|
||||
$server = $this->createServerModel();
|
||||
$host = factory(DatabaseHost::class)->create();
|
||||
$host = DatabaseHost::factory()->create();
|
||||
|
||||
/** @var \Pterodactyl\Models\Database $db */
|
||||
$db = factory(Database::class)->create(['database_host_id' => $host->id, 'server_id' => $server->id]);
|
||||
$db = Database::factory()->create(['database_host_id' => $host->id, 'server_id' => $server->id]);
|
||||
|
||||
$server->refresh();
|
||||
|
||||
|
@ -138,10 +139,10 @@ class ServerDeletionServiceTest extends IntegrationTestCase
|
|||
public function testExceptionWhileDeletingDatabasesDoesNotAbortIfForceDeleted()
|
||||
{
|
||||
$server = $this->createServerModel();
|
||||
$host = factory(DatabaseHost::class)->create();
|
||||
$host = DatabaseHost::factory()->create();
|
||||
|
||||
/** @var \Pterodactyl\Models\Database $db */
|
||||
$db = factory(Database::class)->create(['database_host_id' => $host->id, 'server_id' => $server->id]);
|
||||
$db = Database::factory()->create(['database_host_id' => $host->id, 'server_id' => $server->id]);
|
||||
|
||||
$server->refresh();
|
||||
|
||||
|
|
Reference in a new issue