Merge pull request #13635 from marcusmoore/bug/sc-23715

Added unique() to some factory properties
This commit is contained in:
snipe 2023-09-20 17:51:22 +01:00 committed by GitHub
commit 46981da400
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 7 additions and 7 deletions

View file

@ -22,7 +22,7 @@ class CompanyFactory extends Factory
public function definition()
{
return [
'name' => $this->faker->company(),
'name' => $this->faker->unique()->company(),
];
}
}

View file

@ -22,7 +22,7 @@ class CustomFieldFactory extends Factory
public function definition()
{
return [
'name' => $this->faker->catchPhrase(),
'name' => $this->faker->unique()->catchPhrase(),
'format' => '',
'element' => 'text',
'auto_add_to_fieldsets' => '0',

View file

@ -22,7 +22,7 @@ class CustomFieldsetFactory extends Factory
public function definition()
{
return [
'name' => $this->faker->catchPhrase(),
'name' => $this->faker->unique()->catchPhrase(),
];
}

View file

@ -23,7 +23,7 @@ class DepreciationFactory extends Factory
public function definition()
{
return [
'name' => $this->faker->catchPhrase(),
'name' => $this->faker->unique()->catchPhrase(),
'user_id' => User::factory()->superuser(),
'months' => 36,
];

View file

@ -23,7 +23,7 @@ class ManufacturerFactory extends Factory
public function definition()
{
return [
'name' => $this->faker->company(),
'name' => $this->faker->unique()->company(),
'user_id' => User::factory()->superuser(),
'support_phone' => $this->faker->phoneNumber(),
'url' => $this->faker->url(),

View file

@ -33,7 +33,7 @@ class UserFactory extends Factory
'permissions' => '{}',
'phone' => $this->faker->phoneNumber(),
'state' => $this->faker->stateAbbr(),
'username' => $this->faker->username(),
'username' => $this->faker->unique()->username(),
'zip' => $this->faker->postcode(),
];
}