mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-15 16:57:09 +00:00
Improve randomness in test data to prevent key collisions.
This commit is contained in:
@@ -42,7 +42,7 @@ class BillFactoryTest extends TestCase
|
||||
public function testCreateBasic(): void
|
||||
{
|
||||
$data = [
|
||||
'name' => 'Some new bill #' . random_int(1, 1000),
|
||||
'name' => 'Some new bill #' . random_int(1, 10000),
|
||||
'amount_min' => '5',
|
||||
'transaction_currency_id' => 1,
|
||||
'amount_max' => '10',
|
||||
@@ -76,7 +76,7 @@ class BillFactoryTest extends TestCase
|
||||
public function testCreateEmptyNotes(): void
|
||||
{
|
||||
$data = [
|
||||
'name' => 'Some new bill #' . random_int(1, 1000),
|
||||
'name' => 'Some new bill #' . random_int(1, 10000),
|
||||
'amount_min' => '5',
|
||||
'amount_max' => '10',
|
||||
'date' => '2018-01-01',
|
||||
@@ -144,7 +144,7 @@ class BillFactoryTest extends TestCase
|
||||
/** @var BillFactory $factory */
|
||||
$factory = app(BillFactory::class);
|
||||
$factory->setUser($this->user());
|
||||
$piggy = $factory->find(null, 'I dont exist' . random_int(1, 1000));
|
||||
$piggy = $factory->find(null, 'I dont exist' . random_int(1, 10000));
|
||||
|
||||
$this->assertNull($piggy);
|
||||
}
|
||||
|
Reference in New Issue
Block a user