mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-13 11:53:45 +02:00
@@ -7,7 +7,6 @@ use Pterodactyl\Models\Node;
|
||||
use InvalidArgumentException;
|
||||
use Pterodactyl\Models\Database;
|
||||
use Pterodactyl\Models\DatabaseHost;
|
||||
use Symfony\Component\VarDumper\Cloner\Data;
|
||||
use Pterodactyl\Tests\Integration\IntegrationTestCase;
|
||||
use Pterodactyl\Services\Databases\DatabaseManagementService;
|
||||
use Pterodactyl\Services\Databases\DeployServerDatabaseService;
|
||||
@@ -53,7 +52,7 @@ class DeployServerDatabaseServiceTest extends IntegrationTestCase
|
||||
$server = $this->createServerModel();
|
||||
|
||||
$this->expectException(InvalidArgumentException::class);
|
||||
$this->expectExceptionMessageMatches('/^Expected a non-empty value\. Got: /',);
|
||||
$this->expectExceptionMessageMatches('/^Expected a non-empty value\. Got: /', );
|
||||
$this->getService()->handle($server, $data);
|
||||
}
|
||||
|
||||
@@ -65,8 +64,8 @@ class DeployServerDatabaseServiceTest extends IntegrationTestCase
|
||||
{
|
||||
$server = $this->createServerModel();
|
||||
|
||||
$node = factory(Node::class)->create(['location_id' => $server->location->id]);
|
||||
factory(DatabaseHost::class)->create(['node_id' => $node->id]);
|
||||
$node = Node::factory()->create(['location_id' => $server->location->id]);
|
||||
DatabaseHost::factory()->create(['node_id' => $node->id]);
|
||||
|
||||
config()->set('pterodactyl.client_features.databases.allow_random', false);
|
||||
|
||||
@@ -100,9 +99,9 @@ class DeployServerDatabaseServiceTest extends IntegrationTestCase
|
||||
{
|
||||
$server = $this->createServerModel();
|
||||
|
||||
$node = factory(Node::class)->create(['location_id' => $server->location->id]);
|
||||
factory(DatabaseHost::class)->create(['node_id' => $node->id]);
|
||||
$host = factory(DatabaseHost::class)->create(['node_id' => $server->node_id]);
|
||||
$node = Node::factory()->create(['location_id' => $server->location->id]);
|
||||
DatabaseHost::factory()->create(['node_id' => $node->id]);
|
||||
$host = DatabaseHost::factory()->create(['node_id' => $server->node_id]);
|
||||
|
||||
$this->managementService->expects('create')->with($server, [
|
||||
'database_host_id' => $host->id,
|
||||
@@ -127,8 +126,8 @@ class DeployServerDatabaseServiceTest extends IntegrationTestCase
|
||||
{
|
||||
$server = $this->createServerModel();
|
||||
|
||||
$node = factory(Node::class)->create(['location_id' => $server->location->id]);
|
||||
$host = factory(DatabaseHost::class)->create(['node_id' => $node->id]);
|
||||
$node = Node::factory()->create(['location_id' => $server->location->id]);
|
||||
$host = DatabaseHost::factory()->create(['node_id' => $node->id]);
|
||||
|
||||
$this->managementService->expects('create')->with($server, [
|
||||
'database_host_id' => $host->id,
|
||||
|
||||
Reference in New Issue
Block a user