mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-19 14:53:45 +02:00
cleanup some files
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
namespace Pterodactyl\Tests\Integration\Services\Databases;
|
||||
|
||||
use Mockery;
|
||||
use Exception;
|
||||
use BadMethodCallException;
|
||||
use InvalidArgumentException;
|
||||
use Pterodactyl\Models\Database;
|
||||
|
||||
@@ -155,7 +155,7 @@ class BuildModificationServiceTest extends IntegrationTestCase
|
||||
public function testNoExceptionIsThrownIfOnlyRemovingAllocation()
|
||||
{
|
||||
$server = $this->createServerModel();
|
||||
/** @var \Pterodactyl\Models\Allocation[] $allocations */
|
||||
/** @var \Pterodactyl\Models\Allocation $allocation */
|
||||
$allocation = Allocation::factory()->create(['node_id' => $server->node_id, 'server_id' => $server->id]);
|
||||
|
||||
$this->daemonServerRepository->expects('setServer->update')->andReturnUndefined();
|
||||
@@ -178,7 +178,7 @@ class BuildModificationServiceTest extends IntegrationTestCase
|
||||
public function testAllocationInBothAddAndRemoveIsAdded()
|
||||
{
|
||||
$server = $this->createServerModel();
|
||||
/** @var \Pterodactyl\Models\Allocation[] $allocations */
|
||||
/** @var \Pterodactyl\Models\Allocation $allocation */
|
||||
$allocation = Allocation::factory()->create(['node_id' => $server->node_id]);
|
||||
|
||||
$this->daemonServerRepository->expects('setServer->update')->andReturnUndefined();
|
||||
@@ -197,8 +197,9 @@ class BuildModificationServiceTest extends IntegrationTestCase
|
||||
public function testUsingSameAllocationIdMultipleTimesDoesNotError()
|
||||
{
|
||||
$server = $this->createServerModel();
|
||||
/** @var \Pterodactyl\Models\Allocation[] $allocations */
|
||||
/** @var \Pterodactyl\Models\Allocation $allocation */
|
||||
$allocation = Allocation::factory()->create(['node_id' => $server->node_id, 'server_id' => $server->id]);
|
||||
/** @var \Pterodactyl\Models\Allocation $allocation2 */
|
||||
$allocation2 = Allocation::factory()->create(['node_id' => $server->node_id]);
|
||||
|
||||
$this->daemonServerRepository->expects('setServer->update')->andReturnUndefined();
|
||||
@@ -219,7 +220,7 @@ class BuildModificationServiceTest extends IntegrationTestCase
|
||||
public function testThatUpdatesAreRolledBackIfExceptionIsEncountered()
|
||||
{
|
||||
$server = $this->createServerModel();
|
||||
/** @var \Pterodactyl\Models\Allocation[] $allocations */
|
||||
/** @var \Pterodactyl\Models\Allocation $allocation */
|
||||
$allocation = Allocation::factory()->create(['node_id' => $server->node_id]);
|
||||
|
||||
$this->daemonServerRepository->expects('setServer->update')->andThrows(new DisplayException('Test'));
|
||||
|
||||
@@ -50,9 +50,12 @@ class ServerCreationServiceTest extends IntegrationTestCase
|
||||
/** @var \Pterodactyl\Models\User $user */
|
||||
$user = User::factory()->create();
|
||||
|
||||
/** @var \Pterodactyl\Models\Location $location */
|
||||
$location = Location::factory()->create();
|
||||
|
||||
/** @var \Pterodactyl\Models\Node $node */
|
||||
$node = Node::factory()->create([
|
||||
'location_id' => Location::factory()->create()->id,
|
||||
'location_id' => $location->id,
|
||||
]);
|
||||
|
||||
/** @var \Pterodactyl\Models\Allocation[]|\Illuminate\Database\Eloquent\Collection $allocations */
|
||||
|
||||
Reference in New Issue
Block a user