mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-05-04 05:06:37 +00:00
Improve randomness in test data to prevent key collisions.
This commit is contained in:
@@ -57,7 +57,7 @@ class StageImportDataHandlerTest extends TestCase
|
||||
{
|
||||
$job = new ImportJob;
|
||||
$job->user_id = $this->user()->id;
|
||||
$job->key = 'sidh_bbunq_' . random_int(1, 1000);
|
||||
$job->key = 'sidh_bbunq_' . random_int(1, 10000);
|
||||
$job->status = 'new';
|
||||
$job->stage = 'new';
|
||||
$job->provider = 'bunq';
|
||||
@@ -107,7 +107,7 @@ class StageImportDataHandlerTest extends TestCase
|
||||
$payment = new BunqPayment($amount, $pointer, 'Some descr', null, null);
|
||||
$payment->setAmount($amount);
|
||||
$payment->setCounterpartyAlias($labelMonetaryAccount);
|
||||
$payment->setDescription('Random description #' . random_int(1, 1000));
|
||||
$payment->setDescription('Random description #' . random_int(1, 10000));
|
||||
$value = [$payment];
|
||||
$list = new BunqResponsePaymentList($value, [], null);
|
||||
|
||||
@@ -191,7 +191,7 @@ class StageImportDataHandlerTest extends TestCase
|
||||
{
|
||||
$job = new ImportJob;
|
||||
$job->user_id = $this->user()->id;
|
||||
$job->key = 'sidA_bbunq_' . random_int(1, 1000);
|
||||
$job->key = 'sidA_bbunq_' . random_int(1, 10000);
|
||||
$job->status = 'new';
|
||||
$job->stage = 'new';
|
||||
$job->provider = 'bunq';
|
||||
@@ -253,7 +253,7 @@ class StageImportDataHandlerTest extends TestCase
|
||||
{
|
||||
$job = new ImportJob;
|
||||
$job->user_id = $this->user()->id;
|
||||
$job->key = 'sidh_bbunq_' . random_int(1, 1000);
|
||||
$job->key = 'sidh_bbunq_' . random_int(1, 10000);
|
||||
$job->status = 'new';
|
||||
$job->stage = 'new';
|
||||
$job->provider = 'bunq';
|
||||
@@ -295,7 +295,7 @@ class StageImportDataHandlerTest extends TestCase
|
||||
|
||||
$payment = new BunqPayment($amount, $pointer, 'Some descr', null, null);
|
||||
$payment->setAmount($amount);
|
||||
$payment->setDescription('Some random thing #' . random_int(1, 1000));
|
||||
$payment->setDescription('Some random thing #' . random_int(1, 10000));
|
||||
$payment->setCounterpartyAlias($labelMonetaryAccount);
|
||||
$value = [$payment];
|
||||
$list = new BunqResponsePaymentList($value, [], null);
|
||||
@@ -377,7 +377,7 @@ class StageImportDataHandlerTest extends TestCase
|
||||
{
|
||||
$job = new ImportJob;
|
||||
$job->user_id = $this->user()->id;
|
||||
$job->key = 'sidh_bbunq_' . random_int(1, 1000);
|
||||
$job->key = 'sidh_bbunq_' . random_int(1, 10000);
|
||||
$job->status = 'new';
|
||||
$job->stage = 'new';
|
||||
$job->provider = 'bunq';
|
||||
@@ -427,7 +427,7 @@ class StageImportDataHandlerTest extends TestCase
|
||||
$payment = new BunqPayment($amount, $pointer, 'Some descr', null, null);
|
||||
$payment->setAmount($amount);
|
||||
$payment->setCounterpartyAlias($labelMonetaryAccount);
|
||||
$payment->setDescription('Random transfer #' . random_int(1, 1000));
|
||||
$payment->setDescription('Random transfer #' . random_int(1, 10000));
|
||||
$value = [$payment];
|
||||
$list = new BunqResponsePaymentList($value, [], null);
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ class StageNewHandlerTest extends TestCase
|
||||
{
|
||||
$job = new ImportJob;
|
||||
$job->user_id = $this->user()->id;
|
||||
$job->key = 'snh_bunq_' . random_int(1, 1000);
|
||||
$job->key = 'snh_bunq_' . random_int(1, 10000);
|
||||
$job->status = 'new';
|
||||
$job->stage = 'new';
|
||||
$job->provider = 'bunq';
|
||||
@@ -143,7 +143,7 @@ class StageNewHandlerTest extends TestCase
|
||||
{
|
||||
$job = new ImportJob;
|
||||
$job->user_id = $this->user()->id;
|
||||
$job->key = 'snha_bunq_' . random_int(1, 1000);
|
||||
$job->key = 'snha_bunq_' . random_int(1, 10000);
|
||||
$job->status = 'new';
|
||||
$job->stage = 'new';
|
||||
$job->provider = 'bunq';
|
||||
@@ -234,7 +234,7 @@ class StageNewHandlerTest extends TestCase
|
||||
{
|
||||
$job = new ImportJob;
|
||||
$job->user_id = $this->user()->id;
|
||||
$job->key = 'snh_bbunq_' . random_int(1, 1000);
|
||||
$job->key = 'snh_bbunq_' . random_int(1, 10000);
|
||||
$job->status = 'new';
|
||||
$job->stage = 'new';
|
||||
$job->provider = 'bunq';
|
||||
|
||||
Reference in New Issue
Block a user