mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-24 21:24:13 -08:00
Add unique() to some factory properties
This commit is contained in:
parent
15c71439b6
commit
90e75a3e2c
|
@ -22,7 +22,7 @@ class CompanyFactory extends Factory
|
|||
public function definition()
|
||||
{
|
||||
return [
|
||||
'name' => $this->faker->company(),
|
||||
'name' => $this->faker->unique()->company(),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -22,7 +22,7 @@ class CustomFieldsetFactory extends Factory
|
|||
public function definition()
|
||||
{
|
||||
return [
|
||||
'name' => $this->faker->catchPhrase(),
|
||||
'name' => $this->faker->unique()->catchPhrase(),
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
@ -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,
|
||||
];
|
||||
|
|
|
@ -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(),
|
||||
|
|
|
@ -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(),
|
||||
];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue