Skip to content

Commit

Permalink
rand() function changed as random_int()
Browse files Browse the repository at this point in the history
  • Loading branch information
hkulekci committed Feb 17, 2023
1 parent 292f852 commit ea3e2f4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/Feature/ImportCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ public function test_import_entites(): void
$dispatcher = Product::getEventDispatcher();
Product::unsetEventDispatcher();

$productsAmount = rand(1, 5);
$productsAmount = random_int(1, 5);

factory(Product::class, $productsAmount)->create();

$productsUnsearchableAmount = rand(1, 5);
$productsUnsearchableAmount = random_int(1, 5);
factory(Product::class, $productsUnsearchableAmount)->states(['archive'])->create();

Product::setEventDispatcher($dispatcher);
Expand All @@ -53,7 +53,7 @@ public function test_import_entites_in_queue(): void
$dispatcher = Product::getEventDispatcher();
Product::unsetEventDispatcher();

$productsAmount = rand(1, 5);
$productsAmount = random_int(1, 5);
factory(Product::class, $productsAmount)->create();

Product::setEventDispatcher($dispatcher);
Expand Down Expand Up @@ -137,7 +137,7 @@ public function test_remove_old_index_after_switching_to_new(): void
$dispatcher = Product::getEventDispatcher();
Product::unsetEventDispatcher();

$productsAmount = rand(1, 5);
$productsAmount = random_int(1, 5);

factory(Product::class, $productsAmount)->create();

Expand Down

0 comments on commit ea3e2f4

Please sign in to comment.