mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-11 22:07:29 -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()
|
public function definition()
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'name' => $this->faker->company(),
|
'name' => $this->faker->unique()->company(),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,7 @@ class CustomFieldFactory extends Factory
|
||||||
public function definition()
|
public function definition()
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'name' => $this->faker->catchPhrase(),
|
'name' => $this->faker->unique()->catchPhrase(),
|
||||||
'format' => '',
|
'format' => '',
|
||||||
'element' => 'text',
|
'element' => 'text',
|
||||||
'auto_add_to_fieldsets' => '0',
|
'auto_add_to_fieldsets' => '0',
|
||||||
|
|
|
@ -22,7 +22,7 @@ class CustomFieldsetFactory extends Factory
|
||||||
public function definition()
|
public function definition()
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'name' => $this->faker->catchPhrase(),
|
'name' => $this->faker->unique()->catchPhrase(),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ class DepreciationFactory extends Factory
|
||||||
public function definition()
|
public function definition()
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'name' => $this->faker->catchPhrase(),
|
'name' => $this->faker->unique()->catchPhrase(),
|
||||||
'user_id' => User::factory()->superuser(),
|
'user_id' => User::factory()->superuser(),
|
||||||
'months' => 36,
|
'months' => 36,
|
||||||
];
|
];
|
||||||
|
|
|
@ -23,7 +23,7 @@ class ManufacturerFactory extends Factory
|
||||||
public function definition()
|
public function definition()
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'name' => $this->faker->company(),
|
'name' => $this->faker->unique()->company(),
|
||||||
'user_id' => User::factory()->superuser(),
|
'user_id' => User::factory()->superuser(),
|
||||||
'support_phone' => $this->faker->phoneNumber(),
|
'support_phone' => $this->faker->phoneNumber(),
|
||||||
'url' => $this->faker->url(),
|
'url' => $this->faker->url(),
|
||||||
|
|
|
@ -33,7 +33,7 @@ class UserFactory extends Factory
|
||||||
'permissions' => '{}',
|
'permissions' => '{}',
|
||||||
'phone' => $this->faker->phoneNumber(),
|
'phone' => $this->faker->phoneNumber(),
|
||||||
'state' => $this->faker->stateAbbr(),
|
'state' => $this->faker->stateAbbr(),
|
||||||
'username' => $this->faker->username(),
|
'username' => $this->faker->unique()->username(),
|
||||||
'zip' => $this->faker->postcode(),
|
'zip' => $this->faker->postcode(),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue