| @@ -8,8 +8,9 @@ | ||
| 8 | 8 | |
| 9 | 9 | class DonorFactory extends ModelFactory |
| 10 | 10 | { |
| 11 | 11 | /** |
| 12 | + * @since 4.18.0 Generate a unique "email", because the donors table does not accept a duplicate. | |
| 12 | 13 | * @since 4.4.0 Add "company", "avatarId", "additionalEmails", and "addresses" properties |
| 13 | 14 | * @since 3.7.0 Add "phone" property |
| 14 | 15 | * @since 2.19.6 |
| 15 | 16 | */ |
| @@ -43,9 +44,9 @@ | ||
| 43 | 44 | 'firstName' => $firstName, |
| 44 | 45 | 'lastName' => $lastName, |
| 45 | 46 | 'prefix' => $this->faker->randomElement(give_get_option('title_prefixes', array_values(give_get_default_title_prefixes()))), |
| 46 | 47 | 'name' => trim("$firstName $lastName"), |
| 47 | - 'email' => $this->faker->email, | |
| 48 | + 'email' => $this->faker->unique()->email, | |
| 48 | 49 | 'phone' => $this->faker->phoneNumber, |
| 49 | 50 | 'company' => $this->faker->company, |
| 50 | 51 | 'avatarId' => $this->faker->optional(0.2)->numberBetween(1, 9999), |
| 51 | 52 | 'additionalEmails' => $additionalEmails, |