Improve randomness in test data to prevent key collisions.

This commit is contained in:
James Cole
2018-07-14 16:41:07 +02:00
parent ff403dfa2e
commit 3d1523a060
50 changed files with 283 additions and 283 deletions

View File

@@ -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';

View File

@@ -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';

View File

@@ -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';