diff --git a/database/Factories/AllocationFactory.php b/database/Factories/AllocationFactory.php index 23e3f8b0c..19405b702 100644 --- a/database/Factories/AllocationFactory.php +++ b/database/Factories/AllocationFactory.php @@ -21,7 +21,7 @@ class AllocationFactory extends Factory public function definition(): array { return [ - 'ip' => $this->faker->unique()->ipv4, + 'ip' => $this->faker->unique()->ipv4(), 'port' => $this->faker->unique()->numberBetween(1024, 65535), ]; } diff --git a/database/Factories/BackupFactory.php b/database/Factories/BackupFactory.php index 45609b361..557678fa0 100644 --- a/database/Factories/BackupFactory.php +++ b/database/Factories/BackupFactory.php @@ -23,7 +23,7 @@ class BackupFactory extends Factory { return [ 'uuid' => Uuid::uuid4()->toString(), - 'name' => $this->faker->sentence, + 'name' => $this->faker->sentence(), 'disk' => Backup::ADAPTER_DAEMON, 'is_successful' => true, 'created_at' => CarbonImmutable::now(), diff --git a/database/Factories/DatabaseHostFactory.php b/database/Factories/DatabaseHostFactory.php index aedfd147e..aaf8bbc69 100644 --- a/database/Factories/DatabaseHostFactory.php +++ b/database/Factories/DatabaseHostFactory.php @@ -21,11 +21,11 @@ class DatabaseHostFactory extends Factory public function definition(): array { return [ - 'name' => $this->faker->colorName, - 'host' => $this->faker->unique()->ipv4, + 'name' => $this->faker->colorName(), + 'host' => $this->faker->unique()->ipv4(), 'port' => 3306, - 'username' => $this->faker->colorName, - 'password' => Crypt::encrypt($this->faker->word), + 'username' => $this->faker->colorName(), + 'password' => Crypt::encrypt($this->faker->word()), ]; } } diff --git a/database/Factories/EggFactory.php b/database/Factories/EggFactory.php index 5daa249d9..36ec942fa 100644 --- a/database/Factories/EggFactory.php +++ b/database/Factories/EggFactory.php @@ -22,7 +22,7 @@ class EggFactory extends Factory { return [ 'uuid' => Uuid::uuid4()->toString(), - 'name' => $this->faker->name, + 'name' => $this->faker->name(), 'description' => implode(' ', $this->faker->sentences()), 'startup' => 'java -jar test.jar', ]; diff --git a/database/Factories/EggVariableFactory.php b/database/Factories/EggVariableFactory.php index 3fa9c2e99..b2008cc3f 100644 --- a/database/Factories/EggVariableFactory.php +++ b/database/Factories/EggVariableFactory.php @@ -21,10 +21,10 @@ class EggVariableFactory extends Factory public function definition(): array { return [ - 'name' => $this->faker->unique()->firstName, + 'name' => $this->faker->unique()->firstName(), 'description' => $this->faker->sentence(), 'env_variable' => Str::upper(Str::replaceArray(' ', ['_'], $this->faker->words(2, true))), - 'default_value' => $this->faker->colorName, + 'default_value' => $this->faker->colorName(), 'user_viewable' => 0, 'user_editable' => 0, 'rules' => 'required|string', diff --git a/database/Factories/NodeFactory.php b/database/Factories/NodeFactory.php index 1f6313fad..d8a7fff22 100644 --- a/database/Factories/NodeFactory.php +++ b/database/Factories/NodeFactory.php @@ -26,7 +26,7 @@ class NodeFactory extends Factory 'uuid' => Uuid::uuid4()->toString(), 'public' => true, 'name' => 'FactoryNode_' . Str::random(10), - 'fqdn' => $this->faker->unique()->ipv4, + 'fqdn' => $this->faker->unique()->ipv4(), 'scheme' => 'http', 'behind_proxy' => false, 'memory' => 1024, diff --git a/database/Factories/ServerFactory.php b/database/Factories/ServerFactory.php index de8043270..8a594b86c 100644 --- a/database/Factories/ServerFactory.php +++ b/database/Factories/ServerFactory.php @@ -27,7 +27,7 @@ class ServerFactory extends Factory return [ 'uuid' => Uuid::uuid4()->toString(), 'uuidShort' => Str::lower(Str::random(8)), - 'name' => $this->faker->firstName, + 'name' => $this->faker->firstName(), 'description' => implode(' ', $this->faker->sentences()), 'skip_scripts' => 0, 'status' => null, diff --git a/database/Factories/UserFactory.php b/database/Factories/UserFactory.php index a1a33092d..74d2cdbb4 100644 --- a/database/Factories/UserFactory.php +++ b/database/Factories/UserFactory.php @@ -27,10 +27,10 @@ class UserFactory extends Factory return [ 'external_id' => null, 'uuid' => Uuid::uuid4()->toString(), - 'username' => $this->faker->userName . '_' . Str::random(10), + 'username' => $this->faker->userName() . '_' . Str::random(10), 'email' => Str::random(32) . '@example.com', - 'name_first' => $this->faker->firstName, - 'name_last' => $this->faker->lastName, + 'name_first' => $this->faker->firstName(), + 'name_last' => $this->faker->lastName(), 'password' => $password ?: $password = bcrypt('password'), 'language' => 'en', 'root_admin' => false, diff --git a/tests/Integration/Api/Client/Server/Subuser/CreateServerSubuserTest.php b/tests/Integration/Api/Client/Server/Subuser/CreateServerSubuserTest.php index 995d39be2..55ed7d704 100644 --- a/tests/Integration/Api/Client/Server/Subuser/CreateServerSubuserTest.php +++ b/tests/Integration/Api/Client/Server/Subuser/CreateServerSubuserTest.php @@ -24,7 +24,7 @@ class CreateServerSubuserTest extends ClientApiIntegrationTestCase [$user, $server] = $this->generateTestAccount($permissions); $response = $this->actingAs($user)->postJson($this->link($server) . '/users', [ - 'email' => $email = $this->faker->email, + 'email' => $email = $this->faker->email(), 'permissions' => [ Permission::ACTION_USER_CREATE, ], @@ -61,7 +61,7 @@ class CreateServerSubuserTest extends ClientApiIntegrationTestCase ]); $response = $this->actingAs($user)->postJson($this->link($server) . '/users', [ - 'email' => $this->faker->email, + 'email' => $this->faker->email(), 'permissions' => [ Permission::ACTION_USER_CREATE, Permission::ACTION_USER_UPDATE, // This permission is not assigned to the subuser. @@ -112,7 +112,7 @@ class CreateServerSubuserTest extends ClientApiIntegrationTestCase [$user, $server] = $this->generateTestAccount(); /** @var \App\Models\User $existing */ - $existing = User::factory()->create(['email' => $this->faker->email]); + $existing = User::factory()->create(['email' => $this->faker->email()]); $response = $this->actingAs($user)->postJson($this->link($server) . '/users', [ 'email' => $existing->email, @@ -135,7 +135,7 @@ class CreateServerSubuserTest extends ClientApiIntegrationTestCase [$user, $server] = $this->generateTestAccount(); $response = $this->actingAs($user)->postJson($this->link($server) . '/users', [ - 'email' => $email = $this->faker->email, + 'email' => $email = $this->faker->email(), 'permissions' => [ Permission::ACTION_USER_CREATE, ], diff --git a/tests/Integration/Services/Servers/ServerCreationServiceTest.php b/tests/Integration/Services/Servers/ServerCreationServiceTest.php index fddce3f5c..1e7e8b89a 100644 --- a/tests/Integration/Services/Servers/ServerCreationServiceTest.php +++ b/tests/Integration/Services/Servers/ServerCreationServiceTest.php @@ -76,8 +76,8 @@ class ServerCreationServiceTest extends IntegrationTestCase ]); $data = [ - 'name' => $this->faker->name, - 'description' => $this->faker->sentence, + 'name' => $this->faker->name(), + 'description' => $this->faker->sentence(), 'owner_id' => $user->id, 'memory' => 256, 'swap' => 128, @@ -162,8 +162,8 @@ class ServerCreationServiceTest extends IntegrationTestCase ]); $data = [ - 'name' => $this->faker->name, - 'description' => $this->faker->sentence, + 'name' => $this->faker->name(), + 'description' => $this->faker->sentence(), 'owner_id' => $user->id, 'allocation_id' => $allocation->id, 'node_id' => $allocation->node_id,