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:
@@ -112,7 +112,7 @@ class StageAuthenticatedHandlerTest extends TestCase
|
||||
|
||||
$job = new ImportJob;
|
||||
$job->user_id = $this->user()->id;
|
||||
$job->key = 'sa_a_' . random_int(1, 1000);
|
||||
$job->key = 'sa_a_' . random_int(1, 10000);
|
||||
$job->status = 'new';
|
||||
$job->stage = 'new';
|
||||
$job->provider = 'spectre';
|
||||
@@ -241,7 +241,7 @@ class StageAuthenticatedHandlerTest extends TestCase
|
||||
|
||||
$job = new ImportJob;
|
||||
$job->user_id = $this->user()->id;
|
||||
$job->key = 'sa_a_' . random_int(1, 1000);
|
||||
$job->key = 'sa_a_' . random_int(1, 10000);
|
||||
$job->status = 'new';
|
||||
$job->stage = 'new';
|
||||
$job->provider = 'spectre';
|
||||
@@ -370,7 +370,7 @@ class StageAuthenticatedHandlerTest extends TestCase
|
||||
|
||||
$job = new ImportJob;
|
||||
$job->user_id = $this->user()->id;
|
||||
$job->key = 'sa_a_' . random_int(1, 1000);
|
||||
$job->key = 'sa_a_' . random_int(1, 10000);
|
||||
$job->status = 'new';
|
||||
$job->stage = 'new';
|
||||
$job->provider = 'spectre';
|
||||
|
||||
@@ -113,7 +113,7 @@ class StageImportDataHandlerTest extends TestCase
|
||||
$revenue = $this->user()->accounts()->where('account_type_id', 5)->first();
|
||||
$job = new ImportJob;
|
||||
$job->user_id = $this->user()->id;
|
||||
$job->key = 'sid_a_' . random_int(1, 1000);
|
||||
$job->key = 'sid_a_' . random_int(1, 10000);
|
||||
$job->status = 'new';
|
||||
$job->stage = 'new';
|
||||
$job->provider = 'spectre';
|
||||
@@ -313,7 +313,7 @@ class StageImportDataHandlerTest extends TestCase
|
||||
$revenue = $this->user()->accounts()->where('account_type_id', 5)->first();
|
||||
$job = new ImportJob;
|
||||
$job->user_id = $this->user()->id;
|
||||
$job->key = 'sid_a_' . random_int(1, 1000);
|
||||
$job->key = 'sid_a_' . random_int(1, 10000);
|
||||
$job->status = 'new';
|
||||
$job->stage = 'new';
|
||||
$job->provider = 'spectre';
|
||||
@@ -510,7 +510,7 @@ class StageImportDataHandlerTest extends TestCase
|
||||
$revenue = $this->user()->accounts()->where('account_type_id', 5)->first();
|
||||
$job = new ImportJob;
|
||||
$job->user_id = $this->user()->id;
|
||||
$job->key = 'sid_a_' . random_int(1, 1000);
|
||||
$job->key = 'sid_a_' . random_int(1, 10000);
|
||||
$job->status = 'new';
|
||||
$job->stage = 'new';
|
||||
$job->provider = 'spectre';
|
||||
|
||||
@@ -59,7 +59,7 @@ class StageNewHandlerTest extends TestCase
|
||||
{
|
||||
$job = new ImportJob;
|
||||
$job->user_id = $this->user()->id;
|
||||
$job->key = 'sn_a_' . random_int(1, 1000);
|
||||
$job->key = 'sn_a_' . random_int(1, 10000);
|
||||
$job->status = 'new';
|
||||
$job->stage = 'new';
|
||||
$job->provider = 'spectre';
|
||||
@@ -126,7 +126,7 @@ class StageNewHandlerTest extends TestCase
|
||||
{
|
||||
$job = new ImportJob;
|
||||
$job->user_id = $this->user()->id;
|
||||
$job->key = 'sn_a_' . random_int(1, 1000);
|
||||
$job->key = 'sn_a_' . random_int(1, 10000);
|
||||
$job->status = 'new';
|
||||
$job->stage = 'new';
|
||||
$job->provider = 'spectre';
|
||||
@@ -179,7 +179,7 @@ class StageNewHandlerTest extends TestCase
|
||||
{
|
||||
$job = new ImportJob;
|
||||
$job->user_id = $this->user()->id;
|
||||
$job->key = 'sn_a_' . random_int(1, 1000);
|
||||
$job->key = 'sn_a_' . random_int(1, 10000);
|
||||
$job->status = 'new';
|
||||
$job->stage = 'new';
|
||||
$job->provider = 'spectre';
|
||||
@@ -248,7 +248,7 @@ class StageNewHandlerTest extends TestCase
|
||||
{
|
||||
$job = new ImportJob;
|
||||
$job->user_id = $this->user()->id;
|
||||
$job->key = 'sn_a_' . random_int(1, 1000);
|
||||
$job->key = 'sn_a_' . random_int(1, 10000);
|
||||
$job->status = 'new';
|
||||
$job->stage = 'new';
|
||||
$job->provider = 'spectre';
|
||||
|
||||
Reference in New Issue
Block a user