mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-12-21 02:31:19 +00:00
Improve randomness in test data to prevent key collisions.
This commit is contained in:
@@ -65,7 +65,7 @@ class JournalUpdateServiceTest extends TestCase
|
||||
/** @var TransactionJournal $journal */
|
||||
$journal = $this->user()->transactionJournals()->where('transaction_type_id', 2)->first();
|
||||
$data = [
|
||||
'description' => 'Updated journal #' . random_int(1, 1000),
|
||||
'description' => 'Updated journal #' . random_int(1, 10000),
|
||||
'date' => new Carbon('2018-01-01'),
|
||||
'bill_id' => null,
|
||||
'bill_name' => null,
|
||||
@@ -107,7 +107,7 @@ class JournalUpdateServiceTest extends TestCase
|
||||
/** @var TransactionJournal $journal */
|
||||
$journal = $this->user()->transactionJournals()->inRandomOrder()->where('transaction_type_id', 2)->first();
|
||||
$data = [
|
||||
'description' => 'Updated journal #' . random_int(1, 1000),
|
||||
'description' => 'Updated journal #' . random_int(1, 10000),
|
||||
'date' => new Carbon('2018-01-01'),
|
||||
'bill_id' => null,
|
||||
'bill_name' => null,
|
||||
@@ -199,7 +199,7 @@ class JournalUpdateServiceTest extends TestCase
|
||||
/** @var TransactionJournal $journal */
|
||||
$journal = $this->user()->transactionJournals()->skip(4)->where('transaction_type_id', 1)->first();
|
||||
$data = [
|
||||
'description' => 'Updated journal #' . random_int(1, 1000),
|
||||
'description' => 'Updated journal #' . random_int(1, 10000),
|
||||
'date' => new Carbon('2018-01-01'),
|
||||
'bill_id' => null,
|
||||
'bill_name' => null,
|
||||
|
||||
Reference in New Issue
Block a user