Skip to content

Commit

Permalink
[5.x] Decrease the failure rate of RandomTest (#10238)
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonvarga authored May 30, 2024
1 parent 3de4abf commit 31dc040
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/Modifiers/RandomTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,12 @@ public function it_returns_one_random_item($input): void

public static function inputsProvider()
{
$range = range(1, 5000);

return [
'array' => [range('a', 'z')],
'collection' => [collect(range('a', 'z'))],
'query builder' => [Mockery::mock(Builder::class)->shouldReceive('get')->andReturn(collect(range('a', 'z')))->getMock()],
'array' => [$range],
'collection' => [collect($range)],
'query builder' => [Mockery::mock(Builder::class)->shouldReceive('get')->andReturn(collect($range))->getMock()],
];
}

Expand Down

0 comments on commit 31dc040

Please sign in to comment.