mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-19 08:00:19 +00:00
Improve randomness in test data to prevent key collisions.
This commit is contained in:
@@ -45,7 +45,7 @@ class BunqRoutineTest extends TestCase
|
||||
{
|
||||
$job = new ImportJob;
|
||||
$job->user_id = $this->user()->id;
|
||||
$job->key = 'brY_' . random_int(1, 1000);
|
||||
$job->key = 'brY_' . random_int(1, 10000);
|
||||
$job->status = 'ready_to_run';
|
||||
$job->stage = 'go-for-import';
|
||||
$job->provider = 'bunq';
|
||||
@@ -84,7 +84,7 @@ class BunqRoutineTest extends TestCase
|
||||
{
|
||||
$job = new ImportJob;
|
||||
$job->user_id = $this->user()->id;
|
||||
$job->key = 'brX_' . random_int(1, 1000);
|
||||
$job->key = 'brX_' . random_int(1, 10000);
|
||||
$job->status = 'ready_to_run';
|
||||
$job->stage = 'new';
|
||||
$job->provider = 'bunq';
|
||||
|
||||
@@ -45,7 +45,7 @@ class FakeRoutineTest extends TestCase
|
||||
{
|
||||
$job = new ImportJob;
|
||||
$job->user_id = $this->user()->id;
|
||||
$job->key = 'a_route_' . random_int(1, 1000);
|
||||
$job->key = 'a_route_' . random_int(1, 10000);
|
||||
$job->status = 'ready_to_run';
|
||||
$job->stage = 'ahoy';
|
||||
$job->provider = 'fake';
|
||||
@@ -81,7 +81,7 @@ class FakeRoutineTest extends TestCase
|
||||
{
|
||||
$job = new ImportJob;
|
||||
$job->user_id = $this->user()->id;
|
||||
$job->key = 'a_route_' . random_int(1, 1000);
|
||||
$job->key = 'a_route_' . random_int(1, 10000);
|
||||
$job->status = 'ready_to_run';
|
||||
$job->stage = 'final';
|
||||
$job->provider = 'fake';
|
||||
@@ -118,7 +118,7 @@ class FakeRoutineTest extends TestCase
|
||||
{
|
||||
$job = new ImportJob;
|
||||
$job->user_id = $this->user()->id;
|
||||
$job->key = 'a_route_' . random_int(1, 1000);
|
||||
$job->key = 'a_route_' . random_int(1, 10000);
|
||||
$job->status = 'ready_to_run';
|
||||
$job->stage = 'new';
|
||||
$job->provider = 'fake';
|
||||
|
||||
@@ -45,7 +45,7 @@ class FileRoutineTest extends TestCase
|
||||
{
|
||||
$job = new ImportJob;
|
||||
$job->user_id = $this->user()->id;
|
||||
$job->key = 'a_fr_' . random_int(1, 1000);
|
||||
$job->key = 'a_fr_' . random_int(1, 10000);
|
||||
$job->status = 'ready_to_run';
|
||||
$job->stage = 'ready_to_run';
|
||||
$job->provider = 'file';
|
||||
|
||||
@@ -46,7 +46,7 @@ class SpectreRoutineTest extends TestCase
|
||||
{
|
||||
$job = new ImportJob;
|
||||
$job->user_id = $this->user()->id;
|
||||
$job->key = 'SR1A' . random_int(1, 1000);
|
||||
$job->key = 'SR1A' . random_int(1, 10000);
|
||||
$job->status = 'ready_to_run';
|
||||
$job->stage = 'do-authenticate';
|
||||
$job->provider = 'spectre';
|
||||
@@ -77,7 +77,7 @@ class SpectreRoutineTest extends TestCase
|
||||
{
|
||||
$job = new ImportJob;
|
||||
$job->user_id = $this->user()->id;
|
||||
$job->key = 'SR2b' . random_int(1, 1000);
|
||||
$job->key = 'SR2b' . random_int(1, 10000);
|
||||
$job->status = 'ready_to_run';
|
||||
$job->stage = 'authenticated';
|
||||
$job->provider = 'spectre';
|
||||
@@ -115,7 +115,7 @@ class SpectreRoutineTest extends TestCase
|
||||
{
|
||||
$job = new ImportJob;
|
||||
$job->user_id = $this->user()->id;
|
||||
$job->key = 'SR3c' . random_int(1, 1000);
|
||||
$job->key = 'SR3c' . random_int(1, 10000);
|
||||
$job->status = 'ready_to_run';
|
||||
$job->stage = 'go-for-import';
|
||||
$job->provider = 'spectre';
|
||||
@@ -154,7 +154,7 @@ class SpectreRoutineTest extends TestCase
|
||||
{
|
||||
$job = new ImportJob;
|
||||
$job->user_id = $this->user()->id;
|
||||
$job->key = 'SR4A' . random_int(1, 1000);
|
||||
$job->key = 'SR4A' . random_int(1, 10000);
|
||||
$job->status = 'ready_to_run';
|
||||
$job->stage = 'new';
|
||||
$job->provider = 'spectre';
|
||||
@@ -194,7 +194,7 @@ class SpectreRoutineTest extends TestCase
|
||||
{
|
||||
$job = new ImportJob;
|
||||
$job->user_id = $this->user()->id;
|
||||
$job->key = 'SR5A' . random_int(1, 1000);
|
||||
$job->key = 'SR5A' . random_int(1, 10000);
|
||||
$job->status = 'ready_to_run';
|
||||
$job->stage = 'new';
|
||||
$job->provider = 'spectre';
|
||||
|
||||
Reference in New Issue
Block a user