Skip to content

Commit 0743be8

Browse files
authored
Enforce unique for term factory (#755)
* Enforce unique for term factory * Limit to 1
1 parent f8a5f7b commit 0743be8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/mantle/database/factory/class-term-factory.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ public function __construct( Generator $faker, protected string $taxonomy = 'pos
5050
*/
5151
public function definition(): array {
5252
return [
53-
'description' => trim( $this->faker->paragraph( 2 ) ),
54-
'name' => $this->faker->words( wp_rand( 2, 4 ), true ),
53+
'description' => trim( $this->faker->paragraph( 1 ) ),
54+
'name' => $this->faker->unique()->words( wp_rand( 2, 4 ), true ),
5555
'taxonomy' => $this->taxonomy,
5656
];
5757
}

0 commit comments

Comments
 (0)