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

@@ -49,7 +49,7 @@ class AccountFactoryTest extends TestCase
'account_type_id' => null,
'accountType' => 'asset',
'iban' => null,
'name' => 'Basic asset account #' . random_int(1, 1000),
'name' => 'Basic asset account #' . random_int(1, 10000),
'virtualBalance' => null,
'active' => true,
'accountRole' => 'defaultAsset',
@@ -88,7 +88,7 @@ class AccountFactoryTest extends TestCase
'account_type_id' => null,
'accountType' => 'asset',
'iban' => null,
'name' => 'Basic asset account #' . random_int(1, 1000),
'name' => 'Basic asset account #' . random_int(1, 10000),
'virtualBalance' => '',
'active' => true,
'accountRole' => 'defaultAsset',
@@ -127,7 +127,7 @@ class AccountFactoryTest extends TestCase
'account_type_id' => null,
'accountType' => 'asset',
'iban' => null,
'name' => 'Basic CC account #' . random_int(1, 1000),
'name' => 'Basic CC account #' . random_int(1, 10000),
'virtualBalance' => null,
'active' => true,
'accountRole' => 'ccAsset',
@@ -174,7 +174,7 @@ class AccountFactoryTest extends TestCase
'account_type_id' => null,
'accountType' => 'expense',
'iban' => null,
'name' => 'Basic expense account #' . random_int(1, 1000),
'name' => 'Basic expense account #' . random_int(1, 10000),
'virtualBalance' => '1243',
'active' => true,
'accountRole' => 'defaultAsset',
@@ -213,7 +213,7 @@ class AccountFactoryTest extends TestCase
'account_type_id' => null,
'accountType' => 'Expense account',
'iban' => null,
'name' => 'Basic expense account #' . random_int(1, 1000),
'name' => 'Basic expense account #' . random_int(1, 10000),
'virtualBalance' => '1243',
'active' => true,
'accountRole' => 'defaultAsset',
@@ -251,7 +251,7 @@ class AccountFactoryTest extends TestCase
'account_type_id' => null,
'accountType' => 'asset',
'iban' => null,
'name' => 'Basic asset account #' . random_int(1, 1000),
'name' => 'Basic asset account #' . random_int(1, 10000),
'virtualBalance' => null,
'active' => true,
'accountRole' => 'defaultAsset',
@@ -297,7 +297,7 @@ class AccountFactoryTest extends TestCase
'account_type_id' => null,
'accountType' => 'asset',
'iban' => null,
'name' => 'Basic asset account #' . random_int(1, 1000),
'name' => 'Basic asset account #' . random_int(1, 10000),
'virtualBalance' => null,
'active' => true,
'accountRole' => 'defaultAsset',
@@ -342,7 +342,7 @@ class AccountFactoryTest extends TestCase
'account_type_id' => null,
'accountType' => 'asset',
'iban' => 'NL02ABNA0870809585',
'name' => 'Basic asset account #' . random_int(1, 1000),
'name' => 'Basic asset account #' . random_int(1, 10000),
'virtualBalance' => null,
'active' => true,
'accountRole' => 'defaultAsset',
@@ -381,7 +381,7 @@ class AccountFactoryTest extends TestCase
'account_type_id' => null,
'accountType' => 'asset',
'iban' => 'NL1XRABO032674X238',
'name' => 'Basic asset account #' . random_int(1, 1000),
'name' => 'Basic asset account #' . random_int(1, 10000),
'virtualBalance' => null,
'active' => true,
'accountRole' => 'defaultAsset',
@@ -420,7 +420,7 @@ class AccountFactoryTest extends TestCase
'account_type_id' => null,
'accountType' => 'asset',
'iban' => null,
'name' => 'Basic asset account #' . random_int(1, 1000),
'name' => 'Basic asset account #' . random_int(1, 10000),
'virtualBalance' => null,
'active' => true,
'accountRole' => 'defaultAsset',
@@ -466,7 +466,7 @@ class AccountFactoryTest extends TestCase
'account_type_id' => null,
'accountType' => 'asset',
'iban' => null,
'name' => 'Basic asset account #' . random_int(1, 1000),
'name' => 'Basic asset account #' . random_int(1, 10000),
'virtualBalance' => null,
'active' => true,
'accountRole' => 'defaultAsset',

View File

@@ -42,7 +42,7 @@ class BillFactoryTest extends TestCase
public function testCreateBasic(): void
{
$data = [
'name' => 'Some new bill #' . random_int(1, 1000),
'name' => 'Some new bill #' . random_int(1, 10000),
'amount_min' => '5',
'transaction_currency_id' => 1,
'amount_max' => '10',
@@ -76,7 +76,7 @@ class BillFactoryTest extends TestCase
public function testCreateEmptyNotes(): void
{
$data = [
'name' => 'Some new bill #' . random_int(1, 1000),
'name' => 'Some new bill #' . random_int(1, 10000),
'amount_min' => '5',
'amount_max' => '10',
'date' => '2018-01-01',
@@ -144,7 +144,7 @@ class BillFactoryTest extends TestCase
/** @var BillFactory $factory */
$factory = app(BillFactory::class);
$factory->setUser($this->user());
$piggy = $factory->find(null, 'I dont exist' . random_int(1, 1000));
$piggy = $factory->find(null, 'I dont exist' . random_int(1, 10000));
$this->assertNull($piggy);
}

View File

@@ -91,7 +91,7 @@ class BudgetFactoryTest extends TestCase
/** @var BudgetFactory $factory */
$factory = app(BudgetFactory::class);
$factory->setUser($this->user());
$this->assertNull($factory->find(null, 'I dont exist.' . random_int(1, 1000)));
$this->assertNull($factory->find(null, 'I dont exist.' . random_int(1, 10000)));
}
}

View File

@@ -80,7 +80,7 @@ class CategoryFactoryTest extends TestCase
*/
public function testFindOrCreateNewName(): void
{
$name = 'Some new category #' . random_int(1, 1000);
$name = 'Some new category #' . random_int(1, 10000);
/** @var CategoryFactory $factory */
$factory = app(CategoryFactory::class);

View File

@@ -91,6 +91,6 @@ class PiggyBankFactoryTest extends TestCase
/** @var PiggyBankFactory $factory */
$factory = app(PiggyBankFactory::class);
$factory->setUser($this->user());
$this->assertNull($factory->find(null, 'I dont exist.' . random_int(1, 1000)));
$this->assertNull($factory->find(null, 'I dont exist.' . random_int(1, 10000)));
}
}

View File

@@ -51,7 +51,7 @@ class TagFactoryTest extends TestCase
*/
public function testFindOrCreateNew(): void
{
$tag = 'Some new tag#' . random_int(1, 1000);
$tag = 'Some new tag#' . random_int(1, 10000);
/** @var TagFactory $factory */
$factory = app(TagFactory::class);
$factory->setUser($this->user());

View File

@@ -43,7 +43,7 @@ class FakeJobConfigurationTest extends TestCase
{
$job = new ImportJob;
$job->user_id = $this->user()->id;
$job->key = 'A_unit_' . random_int(1, 1000);
$job->key = 'A_unit_' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'new';
$job->provider = 'fake';
@@ -66,7 +66,7 @@ class FakeJobConfigurationTest extends TestCase
{
$job = new ImportJob;
$job->user_id = $this->user()->id;
$job->key = 'B_unit_' . random_int(1, 1000);
$job->key = 'B_unit_' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'needs_config';
$job->provider = 'fake';
@@ -89,7 +89,7 @@ class FakeJobConfigurationTest extends TestCase
{
$job = new ImportJob;
$job->user_id = $this->user()->id;
$job->key = 'C_unit_' . random_int(1, 1000);
$job->key = 'C_unit_' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'new';
$job->provider = 'fake';
@@ -114,7 +114,7 @@ class FakeJobConfigurationTest extends TestCase
{
$job = new ImportJob;
$job->user_id = $this->user()->id;
$job->key = 'D_unit_' . random_int(1, 1000);
$job->key = 'D_unit_' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'config';
$job->provider = 'fake';
@@ -142,7 +142,7 @@ class FakeJobConfigurationTest extends TestCase
{
$job = new ImportJob;
$job->user_id = $this->user()->id;
$job->key = 'E_unit_' . random_int(1, 1000);
$job->key = 'E_unit_' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'new';
$job->provider = 'fake';
@@ -169,7 +169,7 @@ class FakeJobConfigurationTest extends TestCase
{
$job = new ImportJob;
$job->user_id = $this->user()->id;
$job->key = 'f_unit_' . random_int(1, 1000);
$job->key = 'f_unit_' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'config';
$job->provider = 'fake';
@@ -197,7 +197,7 @@ class FakeJobConfigurationTest extends TestCase
{
$job = new ImportJob;
$job->user_id = $this->user()->id;
$job->key = 'g_unit_' . random_int(1, 1000);
$job->key = 'g_unit_' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'new';
$job->provider = 'fake';
@@ -224,7 +224,7 @@ class FakeJobConfigurationTest extends TestCase
{
$job = new ImportJob;
$job->user_id = $this->user()->id;
$job->key = 'h_unit_' . random_int(1, 1000);
$job->key = 'h_unit_' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'new';
$job->provider = 'fake';
@@ -259,7 +259,7 @@ class FakeJobConfigurationTest extends TestCase
{
$job = new ImportJob;
$job->user_id = $this->user()->id;
$job->key = 'i_unit_' . random_int(1, 1000);
$job->key = 'i_unit_' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'new';
$job->provider = 'fake';
@@ -294,7 +294,7 @@ class FakeJobConfigurationTest extends TestCase
{
$job = new ImportJob;
$job->user_id = $this->user()->id;
$job->key = 'j_unit_' . random_int(1, 1000);
$job->key = 'j_unit_' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'new';
$job->provider = 'fake';
@@ -329,7 +329,7 @@ class FakeJobConfigurationTest extends TestCase
{
$job = new ImportJob;
$job->user_id = $this->user()->id;
$job->key = 'k_unit_' . random_int(1, 1000);
$job->key = 'k_unit_' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'new';
$job->provider = 'fake';
@@ -364,7 +364,7 @@ class FakeJobConfigurationTest extends TestCase
{
$job = new ImportJob;
$job->user_id = $this->user()->id;
$job->key = 'l_unit_' . random_int(1, 1000);
$job->key = 'l_unit_' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'new';
$job->provider = 'fake';
@@ -399,7 +399,7 @@ class FakeJobConfigurationTest extends TestCase
{
$job = new ImportJob;
$job->user_id = $this->user()->id;
$job->key = 'm_unit_' . random_int(1, 1000);
$job->key = 'm_unit_' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'new';
$job->provider = 'fake';
@@ -434,7 +434,7 @@ class FakeJobConfigurationTest extends TestCase
{
$job = new ImportJob;
$job->user_id = $this->user()->id;
$job->key = 'n_unit_' . random_int(1, 1000);
$job->key = 'n_unit_' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'new';
$job->provider = 'fake';
@@ -469,7 +469,7 @@ class FakeJobConfigurationTest extends TestCase
{
$job = new ImportJob;
$job->user_id = $this->user()->id;
$job->key = 'o_unit_' . random_int(1, 1000);
$job->key = 'o_unit_' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'new';
$job->provider = 'fake';
@@ -504,7 +504,7 @@ class FakeJobConfigurationTest extends TestCase
{
$job = new ImportJob;
$job->user_id = $this->user()->id;
$job->key = 'p_unit_' . random_int(1, 1000);
$job->key = 'p_unit_' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'not_new';
$job->provider = 'fake';
@@ -528,7 +528,7 @@ class FakeJobConfigurationTest extends TestCase
{
$job = new ImportJob;
$job->user_id = $this->user()->id;
$job->key = 'p_unit_' . random_int(1, 1000);
$job->key = 'p_unit_' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'new';
$job->provider = 'fake';
@@ -552,7 +552,7 @@ class FakeJobConfigurationTest extends TestCase
{
$job = new ImportJob;
$job->user_id = $this->user()->id;
$job->key = 'p_unit_' . random_int(1, 1000);
$job->key = 'p_unit_' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'new';
$job->provider = 'fake';
@@ -576,7 +576,7 @@ class FakeJobConfigurationTest extends TestCase
{
$job = new ImportJob;
$job->user_id = $this->user()->id;
$job->key = 'p_unit_' . random_int(1, 1000);
$job->key = 'p_unit_' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'new';
$job->provider = 'fake';

View File

@@ -49,7 +49,7 @@ class FileJobConfigurationTest extends TestCase
{
$job = new ImportJob;
$job->user_id = $this->user()->id;
$job->key = 'File_A_unit_' . random_int(1, 1000);
$job->key = 'File_A_unit_' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'new';
$job->provider = 'fake';
@@ -72,7 +72,7 @@ class FileJobConfigurationTest extends TestCase
{
$job = new ImportJob;
$job->user_id = $this->user()->id;
$job->key = 'File_B_unit_' . random_int(1, 1000);
$job->key = 'File_B_unit_' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'ready_to_run';
$job->provider = 'fake';
@@ -95,7 +95,7 @@ class FileJobConfigurationTest extends TestCase
{
$job = new ImportJob;
$job->user_id = $this->user()->id;
$job->key = 'I-file_' . random_int(1, 1000);
$job->key = 'I-Cfile_' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'map';
$job->provider = 'file';
@@ -103,8 +103,8 @@ class FileJobConfigurationTest extends TestCase
$job->configuration = [];
$job->save();
$bag = new MessageBag;
$result = null;
$bag = new MessageBag;
$result = null;
$configurator = new FileJobConfiguration;
$configurator->setImportJob($job);
@@ -130,7 +130,7 @@ class FileJobConfigurationTest extends TestCase
{
$job = new ImportJob;
$job->user_id = $this->user()->id;
$job->key = 'G-file_' . random_int(1, 1000);
$job->key = 'G-Dfile_' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'configure-upload';
$job->provider = 'file';
@@ -163,7 +163,7 @@ class FileJobConfigurationTest extends TestCase
{
$job = new ImportJob;
$job->user_id = $this->user()->id;
$job->key = 'H-file_' . random_int(1, 1000);
$job->key = 'H-Efile_' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'map';
$job->provider = 'file';
@@ -196,7 +196,7 @@ class FileJobConfigurationTest extends TestCase
{
$job = new ImportJob;
$job->user_id = $this->user()->id;
$job->key = 'F-file_' . random_int(1, 1000);
$job->key = 'F-fFile_' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'new';
$job->provider = 'file';
@@ -229,7 +229,7 @@ class FileJobConfigurationTest extends TestCase
{
$job = new ImportJob;
$job->user_id = $this->user()->id;
$job->key = 'H-file_' . random_int(1, 1000);
$job->key = 'H-fiGle_' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'roles';
$job->provider = 'file';
@@ -262,7 +262,7 @@ class FileJobConfigurationTest extends TestCase
{
$job = new ImportJob;
$job->user_id = $this->user()->id;
$job->key = 'Dfile_' . random_int(1, 1000);
$job->key = 'DfiHle_' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'configure-upload';
$job->provider = 'file';
@@ -290,7 +290,7 @@ class FileJobConfigurationTest extends TestCase
{
$job = new ImportJob;
$job->user_id = $this->user()->id;
$job->key = 'Ffile_' . random_int(1, 1000);
$job->key = 'FfilIe_' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'map';
$job->provider = 'file';
@@ -318,7 +318,7 @@ class FileJobConfigurationTest extends TestCase
{
$job = new ImportJob;
$job->user_id = $this->user()->id;
$job->key = 'Cfile_' . random_int(1, 1000);
$job->key = 'CfJile_' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'new';
$job->provider = 'file';
@@ -346,7 +346,7 @@ class FileJobConfigurationTest extends TestCase
{
$job = new ImportJob;
$job->user_id = $this->user()->id;
$job->key = 'Efile_' . random_int(1, 1000);
$job->key = 'EfiKle_' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'roles';
$job->provider = 'file';

View File

@@ -46,7 +46,7 @@ class SpectreJobConfigurationTest extends TestCase
{
$job = new ImportJob;
$job->user_id = $this->user()->id;
$job->key = 'spectre_jc_A' . random_int(1, 1000);
$job->key = 'spectre_jc_A' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'new';
$job->provider = 'spectre';
@@ -75,7 +75,7 @@ class SpectreJobConfigurationTest extends TestCase
{
$job = new ImportJob;
$job->user_id = $this->user()->id;
$job->key = 'spectre_jc_B' . random_int(1, 1000);
$job->key = 'spectre_jc_B' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'do-authenticate';
$job->provider = 'spectre';
@@ -107,7 +107,7 @@ class SpectreJobConfigurationTest extends TestCase
{
$job = new ImportJob;
$job->user_id = $this->user()->id;
$job->key = 'spectre_jc_C' . random_int(1, 1000);
$job->key = 'spectre_jc_C' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'choose-login';
$job->provider = 'spectre';
@@ -137,7 +137,7 @@ class SpectreJobConfigurationTest extends TestCase
{
$job = new ImportJob;
$job->user_id = $this->user()->id;
$job->key = 'spectre_jc_D' . random_int(1, 1000);
$job->key = 'spectre_jc_D' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'authenticated';
$job->provider = 'spectre';
@@ -166,7 +166,7 @@ class SpectreJobConfigurationTest extends TestCase
{
$job = new ImportJob;
$job->user_id = $this->user()->id;
$job->key = 'spectre_jc_E' . random_int(1, 1000);
$job->key = 'spectre_jc_E' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'choose-accounts';
$job->provider = 'spectre';

View File

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

View File

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

View File

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

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

View File

@@ -58,7 +58,7 @@ class ImportArrayStorageTest extends TestCase
// make fake job
$job = new ImportJob;
$job->user()->associate($this->user());
$job->key = 'a_storage' . random_int(1, 1000);
$job->key = 'a_storage' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'new';
$job->provider = 'fake';
@@ -99,7 +99,7 @@ class ImportArrayStorageTest extends TestCase
// make fake job
$job = new ImportJob;
$job->user()->associate($this->user());
$job->key = 'h_storage' . random_int(1, 1000);
$job->key = 'h_storage' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'new';
$job->provider = 'fake';
@@ -171,7 +171,7 @@ class ImportArrayStorageTest extends TestCase
$transactions = [$this->singleWithdrawal(), $this->singleWithdrawal()];
$job = new ImportJob;
$job->user()->associate($this->user());
$job->key = 'b_storage' . random_int(1, 1000);
$job->key = 'b_storage' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'new';
$job->provider = 'fake';
@@ -232,7 +232,7 @@ class ImportArrayStorageTest extends TestCase
// make fake job
$job = new ImportJob;
$job->user()->associate($this->user());
$job->key = 'c_storage' . random_int(1, 1000);
$job->key = 'c_storage' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'new';
$job->provider = 'fake';
@@ -271,7 +271,7 @@ class ImportArrayStorageTest extends TestCase
// make fake job
$job = new ImportJob;
$job->user()->associate($this->user());
$job->key = 'd_storage' . random_int(1, 1000);
$job->key = 'd_storage' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'new';
$job->provider = 'fake';
@@ -313,7 +313,7 @@ class ImportArrayStorageTest extends TestCase
// make fake job
$job = new ImportJob;
$job->user()->associate($this->user());
$job->key = 'e_storage' . random_int(1, 1000);
$job->key = 'e_storage' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'new';
$job->provider = 'fake';
@@ -364,7 +364,7 @@ class ImportArrayStorageTest extends TestCase
// make fake job
$job = new ImportJob;
$job->user()->associate($this->user());
$job->key = 'f_storage' . random_int(1, 1000);
$job->key = 'f_storage' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'new';
$job->provider = 'fake';
@@ -419,7 +419,7 @@ class ImportArrayStorageTest extends TestCase
// make fake job
$job = new ImportJob;
$job->user()->associate($this->user());
$job->key = 'g_storage' . random_int(1, 1000);
$job->key = 'g_storage' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'new';
$job->provider = 'fake';

View File

@@ -40,7 +40,7 @@ class AccountDestroyServiceTest extends TestCase
public function testDestroyBasic(): void
{
$account = Account::create(
['user_id' => $this->user()->id, 'account_type_id' => 1, 'name' => 'Some name #' . random_int(1, 1000),
['user_id' => $this->user()->id, 'account_type_id' => 1, 'name' => 'Some name #' . random_int(1, 10000),
'virtual_balance' => '0', 'iban' => null, 'active' => true]
);
/** @var AccountDestroyService $service */
@@ -57,7 +57,7 @@ class AccountDestroyServiceTest extends TestCase
{
// create objects:
$account = Account::create(
['user_id' => $this->user()->id, 'account_type_id' => 1, 'name' => 'Some name #' . random_int(1, 1000),
['user_id' => $this->user()->id, 'account_type_id' => 1, 'name' => 'Some name #' . random_int(1, 10000),
'virtual_balance' => '0', 'iban' => null, 'active' => true]
);
Transaction::create(['account_id' => $account->id, 'transaction_journal_id' => 1, 'amount' => 10, 'transaction_currency_id' => 1]);
@@ -79,11 +79,11 @@ class AccountDestroyServiceTest extends TestCase
public function testDestroyMove(): void
{
$account = Account::create(
['user_id' => $this->user()->id, 'account_type_id' => 1, 'name' => 'Some name #' . random_int(1, 1000),
['user_id' => $this->user()->id, 'account_type_id' => 1, 'name' => 'Some name #' . random_int(1, 10000),
'virtual_balance' => '0', 'iban' => null, 'active' => true]
);
$move = Account::create(
['user_id' => $this->user()->id, 'account_type_id' => 1, 'name' => 'Some name #' . random_int(1, 1000),
['user_id' => $this->user()->id, 'account_type_id' => 1, 'name' => 'Some name #' . random_int(1, 10000),
'virtual_balance' => '0', 'iban' => null, 'active' => true]
);
$transaction = Transaction::create(['account_id' => $account->id, 'transaction_journal_id' => 1, 'amount' => 10, 'transaction_currency_id' => 1]);

View File

@@ -46,7 +46,7 @@ class AccountUpdateServiceTest extends TestCase
{
/** @var Account $account */
$account = Account::create(
['user_id' => $this->user()->id, 'account_type_id' => 1, 'name' => 'Some name #' . random_int(1, 1000),
['user_id' => $this->user()->id, 'account_type_id' => 1, 'name' => 'Some name #' . random_int(1, 10000),
'virtual_balance' => '0', 'iban' => null, 'active' => true]
);
$opposing = $this->user()->accounts()->first();
@@ -67,7 +67,7 @@ class AccountUpdateServiceTest extends TestCase
$data = [
'name' => 'Some new name #' . random_int(1, 1000),
'name' => 'Some new name #' . random_int(1, 10000),
'active' => true,
'virtualBalance' => '0',
'iban' => null,
@@ -96,7 +96,7 @@ class AccountUpdateServiceTest extends TestCase
/** @var Account $account */
$account = $this->user()->accounts()->first();
$data = [
'name' => 'Some new name #' . random_int(1, 1000),
'name' => 'Some new name #' . random_int(1, 10000),
'active' => true,
'virtualBalance' => '0',
'iban' => null,
@@ -119,7 +119,7 @@ class AccountUpdateServiceTest extends TestCase
/** @var Account $account */
$account = $this->user()->accounts()->first();
$data = [
'name' => 'Some new name #' . random_int(1, 1000),
'name' => 'Some new name #' . random_int(1, 10000),
'active' => true,
'virtualBalance' => '0',
'iban' => null,
@@ -149,7 +149,7 @@ class AccountUpdateServiceTest extends TestCase
$note->save();
$data = [
'name' => 'Some new name #' . random_int(1, 1000),
'name' => 'Some new name #' . random_int(1, 10000),
'active' => true,
'virtualBalance' => '0',
'iban' => null,
@@ -174,7 +174,7 @@ class AccountUpdateServiceTest extends TestCase
{
/** @var Account $account */
$account = Account::create(
['user_id' => $this->user()->id, 'account_type_id' => 1, 'name' => 'Some name #' . random_int(1, 1000),
['user_id' => $this->user()->id, 'account_type_id' => 1, 'name' => 'Some name #' . random_int(1, 10000),
'virtual_balance' => '0', 'iban' => null, 'active' => true]
);
$opposing = $this->user()->accounts()->first();
@@ -195,7 +195,7 @@ class AccountUpdateServiceTest extends TestCase
$data = [
'name' => 'Some new name #' . random_int(1, 1000),
'name' => 'Some new name #' . random_int(1, 10000),
'active' => true,
'virtualBalance' => '0',
'iban' => null,
@@ -229,7 +229,7 @@ class AccountUpdateServiceTest extends TestCase
/** @var Account $account */
$account = Account::create(
['user_id' => $this->user()->id, 'account_type_id' => 1, 'name' => 'Some name #' . random_int(1, 1000),
['user_id' => $this->user()->id, 'account_type_id' => 1, 'name' => 'Some name #' . random_int(1, 10000),
'virtual_balance' => '0', 'iban' => null, 'active' => true]
);
$opposing = $this->user()->accounts()->first();
@@ -250,7 +250,7 @@ class AccountUpdateServiceTest extends TestCase
$data = [
'name' => 'Some new name #' . random_int(1, 1000),
'name' => 'Some new name #' . random_int(1, 10000),
'active' => true,
'virtualBalance' => '0',
'iban' => null,
@@ -281,11 +281,11 @@ class AccountUpdateServiceTest extends TestCase
{
/** @var Account $account */
$account = Account::create(
['user_id' => $this->user()->id, 'account_type_id' => 1, 'name' => 'Some name #' . random_int(1, 1000),
['user_id' => $this->user()->id, 'account_type_id' => 1, 'name' => 'Some name #' . random_int(1, 10000),
'virtual_balance' => '0', 'iban' => null, 'active' => true]
);
$data = [
'name' => 'Some new name #' . random_int(1, 1000),
'name' => 'Some new name #' . random_int(1, 10000),
'active' => true,
'virtualBalance' => '0',
'iban' => null,

View File

@@ -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,

View File

@@ -50,7 +50,7 @@ class ChooseAccountsHandlerTest extends TestCase
{
$job = new ImportJob;
$job->user_id = $this->user()->id;
$job->key = 'caha' . random_int(1, 1000);
$job->key = 'caha' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'new';
$job->provider = 'bunq';
@@ -81,7 +81,7 @@ class ChooseAccountsHandlerTest extends TestCase
{
$job = new ImportJob;
$job->user_id = $this->user()->id;
$job->key = 'cahb' . random_int(1, 1000);
$job->key = 'cahb' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'new';
$job->provider = 'bunq';
@@ -114,7 +114,7 @@ class ChooseAccountsHandlerTest extends TestCase
{
$job = new ImportJob;
$job->user_id = $this->user()->id;
$job->key = 'cahc' . random_int(1, 1000);
$job->key = 'cahc' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'new';
$job->provider = 'bunq';
@@ -168,7 +168,7 @@ class ChooseAccountsHandlerTest extends TestCase
{
$job = new ImportJob;
$job->user_id = $this->user()->id;
$job->key = 'cahd' . random_int(1, 1000);
$job->key = 'cahd' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'new';
$job->provider = 'bunq';
@@ -222,7 +222,7 @@ class ChooseAccountsHandlerTest extends TestCase
{
$job = new ImportJob;
$job->user_id = $this->user()->id;
$job->key = 'cahe' . random_int(1, 1000);
$job->key = 'cahe' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'new';
$job->provider = 'bunq';
@@ -276,7 +276,7 @@ class ChooseAccountsHandlerTest extends TestCase
{
$job = new ImportJob;
$job->user_id = $this->user()->id;
$job->key = 'cahf' . random_int(1, 1000);
$job->key = 'cahf' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'new';
$job->provider = 'bunq';
@@ -323,7 +323,7 @@ class ChooseAccountsHandlerTest extends TestCase
{
$job = new ImportJob;
$job->user_id = $this->user()->id;
$job->key = 'cahg' . random_int(1, 1000);
$job->key = 'cahg' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'new';
$job->provider = 'bunq';
@@ -386,7 +386,7 @@ class ChooseAccountsHandlerTest extends TestCase
{
$job = new ImportJob;
$job->user_id = $this->user()->id;
$job->key = 'cahg' . random_int(1, 1000);
$job->key = 'cahg' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'new';
$job->provider = 'bunq';

View File

@@ -39,7 +39,7 @@ class NewBunqJobHandlerTest extends TestCase
{
$job = new ImportJob;
$job->user_id = $this->user()->id;
$job->key = 'cXha' . random_int(1, 1000);
$job->key = 'cXha' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'new';
$job->provider = 'bunq';

View File

@@ -51,7 +51,7 @@ class ConfigureMappingHandlerTest extends TestCase
{
$job = new ImportJob;
$job->user_id = $this->user()->id;
$job->key = 'mapG' . random_int(1, 1000);
$job->key = 'mapG' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'new';
$job->provider = 'fake';
@@ -118,7 +118,7 @@ class ConfigureMappingHandlerTest extends TestCase
$job = new ImportJob;
$job->user_id = $this->user()->id;
$job->key = 'mapA' . random_int(1, 1000);
$job->key = 'mapA' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'new';
$job->provider = 'fake';
@@ -150,7 +150,7 @@ class ConfigureMappingHandlerTest extends TestCase
{
$job = new ImportJob;
$job->user_id = $this->user()->id;
$job->key = 'mapE' . random_int(1, 1000);
$job->key = 'mapE' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'new';
$job->provider = 'fake';
@@ -214,7 +214,7 @@ class ConfigureMappingHandlerTest extends TestCase
$job = new ImportJob;
$job->user_id = $this->user()->id;
$job->key = 'mapC' . random_int(1, 1000);
$job->key = 'mapC' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'new';
$job->provider = 'fake';
@@ -243,7 +243,7 @@ class ConfigureMappingHandlerTest extends TestCase
{
$job = new ImportJob;
$job->user_id = $this->user()->id;
$job->key = 'mapH' . random_int(1, 1000);
$job->key = 'mapH' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'new';
$job->provider = 'fake';
@@ -324,7 +324,7 @@ class ConfigureMappingHandlerTest extends TestCase
{
$job = new ImportJob;
$job->user_id = $this->user()->id;
$job->key = 'mapD' . random_int(1, 1000);
$job->key = 'mapD' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'new';
$job->provider = 'fake';
@@ -352,7 +352,7 @@ class ConfigureMappingHandlerTest extends TestCase
{
$job = new ImportJob;
$job->user_id = $this->user()->id;
$job->key = 'mapF' . random_int(1, 1000);
$job->key = 'mapF' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'new';
$job->provider = 'fake';
@@ -439,7 +439,7 @@ class ConfigureMappingHandlerTest extends TestCase
$job = new ImportJob;
$job->user_id = $this->user()->id;
$job->key = 'mapB' . random_int(1, 1000);
$job->key = 'mapB' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'new';
$job->provider = 'fake';
@@ -468,7 +468,7 @@ class ConfigureMappingHandlerTest extends TestCase
$job = new ImportJob;
$job->user_id = $this->user()->id;
$job->key = 'mapB' . random_int(1, 1000);
$job->key = 'mapB' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'new';
$job->provider = 'fake';

View File

@@ -117,7 +117,7 @@ class ConfigureRolesHandlerTest extends TestCase
{
$job = new ImportJob;
$job->user_id = $this->user()->id;
$job->key = 'role-B' . random_int(1, 1000);
$job->key = 'role-B' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'new';
$job->provider = 'fake';
@@ -193,7 +193,7 @@ class ConfigureRolesHandlerTest extends TestCase
{
$job = new ImportJob;
$job->user_id = $this->user()->id;
$job->key = 'role-x' . random_int(1, 1000);
$job->key = 'role-x' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'new';
$job->provider = 'fake';
@@ -270,7 +270,7 @@ class ConfigureRolesHandlerTest extends TestCase
{
$job = new ImportJob;
$job->user_id = $this->user()->id;
$job->key = 'role-x' . random_int(1, 1000);
$job->key = 'role-x' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'new';
$job->provider = 'fake';
@@ -340,7 +340,7 @@ class ConfigureRolesHandlerTest extends TestCase
{
$job = new ImportJob;
$job->user_id = $this->user()->id;
$job->key = 'role-x' . random_int(1, 1000);
$job->key = 'role-x' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'new';
$job->provider = 'fake';
@@ -504,7 +504,7 @@ class ConfigureRolesHandlerTest extends TestCase
{
$job = new ImportJob;
$job->user_id = $this->user()->id;
$job->key = 'role-A' . random_int(1, 1000);
$job->key = 'role-A' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'new';
$job->provider = 'fake';

View File

@@ -43,7 +43,7 @@ class ConfigureUploadHandlerTest extends TestCase
{
$job = new ImportJob;
$job->user_id = $this->user()->id;
$job->key = 'upload-B' . random_int(1, 1000);
$job->key = 'upload-B' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'new';
$job->provider = 'fake';
@@ -92,7 +92,7 @@ class ConfigureUploadHandlerTest extends TestCase
{
$job = new ImportJob;
$job->user_id = $this->user()->id;
$job->key = 'upload-B' . random_int(1, 1000);
$job->key = 'upload-B' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'new';
$job->provider = 'fake';
@@ -140,7 +140,7 @@ class ConfigureUploadHandlerTest extends TestCase
{
$job = new ImportJob;
$job->user_id = $this->user()->id;
$job->key = 'upload-A' . random_int(1, 1000);
$job->key = 'upload-A' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'new';
$job->provider = 'fake';

View File

@@ -46,7 +46,7 @@ class NewFileJobHandlerTest extends TestCase
{
$job = new ImportJob;
$job->user_id = $this->user()->id;
$job->key = 'newfile-A' . random_int(1, 1000);
$job->key = 'newfile-A' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'new';
$job->provider = 'fake';
@@ -101,7 +101,7 @@ class NewFileJobHandlerTest extends TestCase
{
$job = new ImportJob;
$job->user_id = $this->user()->id;
$job->key = 'newfile-A' . random_int(1, 1000);
$job->key = 'newfile-A' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'new';
$job->provider = 'fake';
@@ -159,7 +159,7 @@ class NewFileJobHandlerTest extends TestCase
{
$job = new ImportJob;
$job->user_id = $this->user()->id;
$job->key = 'newfile-A' . random_int(1, 1000);
$job->key = 'newfile-A' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'new';
$job->provider = 'fake';
@@ -206,7 +206,7 @@ class NewFileJobHandlerTest extends TestCase
{
$job = new ImportJob;
$job->user_id = $this->user()->id;
$job->key = 'newfile-x' . random_int(1, 1000);
$job->key = 'newfile-x' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'new';
$job->provider = 'fake';
@@ -254,7 +254,7 @@ class NewFileJobHandlerTest extends TestCase
{
$job = new ImportJob;
$job->user_id = $this->user()->id;
$job->key = 'newfile-x' . random_int(1, 1000);
$job->key = 'newfile-x' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'new';
$job->provider = 'fake';

View File

@@ -54,7 +54,7 @@ class ChooseAccountsHandlerTest extends TestCase
// fake job:
$job = new ImportJob;
$job->user_id = $this->user()->id;
$job->key = 'sca-A' . random_int(1, 1000);
$job->key = 'sca-A' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'new';
$job->provider = 'spectre';
@@ -89,7 +89,7 @@ class ChooseAccountsHandlerTest extends TestCase
// fake job:
$job = new ImportJob;
$job->user_id = $this->user()->id;
$job->key = 'sca-B' . random_int(1, 1000);
$job->key = 'sca-B' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'new';
$job->provider = 'spectre';
@@ -128,7 +128,7 @@ class ChooseAccountsHandlerTest extends TestCase
// fake job:
$job = new ImportJob;
$job->user_id = $this->user()->id;
$job->key = 'sca-c' . random_int(1, 1000);
$job->key = 'sca-c' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'new';
$job->provider = 'spectre';
@@ -187,7 +187,7 @@ class ChooseAccountsHandlerTest extends TestCase
// fake job:
$job = new ImportJob;
$job->user_id = $this->user()->id;
$job->key = 'sca-E' . random_int(1, 1000);
$job->key = 'sca-E' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'new';
$job->provider = 'spectre';
@@ -246,7 +246,7 @@ class ChooseAccountsHandlerTest extends TestCase
// fake job:
$job = new ImportJob;
$job->user_id = $this->user()->id;
$job->key = 'sca-D' . random_int(1, 1000);
$job->key = 'sca-D' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'new';
$job->provider = 'spectre';
@@ -303,7 +303,7 @@ class ChooseAccountsHandlerTest extends TestCase
// fake job:
$job = new ImportJob;
$job->user_id = $this->user()->id;
$job->key = 'sca-E' . random_int(1, 1000);
$job->key = 'sca-E' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'new';
$job->provider = 'spectre';
@@ -433,7 +433,7 @@ class ChooseAccountsHandlerTest extends TestCase
// fake job:
$job = new ImportJob;
$job->user_id = $this->user()->id;
$job->key = 'sca-F' . random_int(1, 1000);
$job->key = 'sca-F' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'new';
$job->provider = 'spectre';
@@ -586,7 +586,7 @@ class ChooseAccountsHandlerTest extends TestCase
// fake job:
$job = new ImportJob;
$job->user_id = $this->user()->id;
$job->key = 'sca-F' . random_int(1, 1000);
$job->key = 'sca-F' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'new';
$job->provider = 'spectre';

View File

@@ -51,7 +51,7 @@ class ChooseLoginHandlerTest extends TestCase
{
$job = new ImportJob;
$job->user_id = $this->user()->id;
$job->key = 'slh-A' . random_int(1, 1000);
$job->key = 'slh-A' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'new';
$job->provider = 'spectre';
@@ -74,7 +74,7 @@ class ChooseLoginHandlerTest extends TestCase
{
$job = new ImportJob;
$job->user_id = $this->user()->id;
$job->key = 'slh-B' . random_int(1, 1000);
$job->key = 'slh-B' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'new';
$job->provider = 'spectre';
@@ -98,7 +98,7 @@ class ChooseLoginHandlerTest extends TestCase
$job = new ImportJob;
$job->user_id = $this->user()->id;
$job->key = 'slh-C' . random_int(1, 1000);
$job->key = 'slh-C' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'new';
$job->provider = 'spectre';
@@ -138,7 +138,7 @@ class ChooseLoginHandlerTest extends TestCase
$job = new ImportJob;
$job->user_id = $this->user()->id;
$job->key = 'slh-C' . random_int(1, 1000);
$job->key = 'slh-C' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'new';
$job->provider = 'spectre';
@@ -256,7 +256,7 @@ class ChooseLoginHandlerTest extends TestCase
$job = new ImportJob;
$job->user_id = $this->user()->id;
$job->key = 'slh-C' . random_int(1, 1000);
$job->key = 'slh-C' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'new';
$job->provider = 'spectre';

View File

@@ -51,7 +51,7 @@ class DoAuthenticateHandlerTest extends TestCase
$job = new ImportJob;
$job->user_id = $this->user()->id;
$job->key = 'sda-A' . random_int(1, 1000);
$job->key = 'sda-A' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'new';
$job->provider = 'spectre';

View File

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

View File

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

View File

@@ -45,7 +45,7 @@ class LineReaderTest extends TestCase
{
$job = new ImportJob;
$job->user_id = $this->user()->id;
$job->key = 'linerA' . random_int(1, 1000);
$job->key = 'linerA' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'new';
$job->provider = 'fake';

View File

@@ -120,7 +120,7 @@ class MappingConvergerTest extends TestCase
$job = new ImportJob;
$job->user_id = $this->user()->id;
$job->key = 'linerB' . random_int(1, 1000);
$job->key = 'linerB' . random_int(1, 10000);
$job->status = 'new';
$job->stage = 'new';
$job->provider = 'fake';

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

View File

@@ -59,7 +59,7 @@ class AddTagTest extends TestCase
{
$journal = TransactionJournal::inRandomOrder()->whereNull('deleted_at')->first();
$ruleAction = new RuleAction;
$ruleAction->action_value = 'TestTag-' . random_int(1, 1000);
$ruleAction->action_value = 'TestTag-' . random_int(1, 10000);
$action = new AddTag($ruleAction);
$result = $action->act($journal);
$this->assertTrue($result);

View File

@@ -39,7 +39,7 @@ class PrependDescriptionTest extends TestCase
public function testAct(): void
{
// get journal, give fixed description
$description = 'text' . random_int(1, 1000);
$description = 'text' . random_int(1, 10000);
$prepend = 'prepend' . random_int(1, 1234);
$journal = TransactionJournal::inRandomOrder()->whereNull('deleted_at')->first();
$journal->description = $description;

View File

@@ -39,7 +39,7 @@ class SetDescriptionTest extends TestCase
public function testAct(): void
{
// get journal, give fixed description
$description = 'text' . random_int(1, 1000);
$description = 'text' . random_int(1, 10000);
$newDescription = 'new description' . random_int(1, 1234);
$journal = TransactionJournal::inRandomOrder()->whereNull('deleted_at')->first();
$journal->description = $description;

View File

@@ -103,7 +103,7 @@ class SetDestinationAccountTest extends TestCase
// fire the action:
$ruleAction = new RuleAction;
$ruleAction->action_value = 'Not existing asset account #' . random_int(1, 1000);
$ruleAction->action_value = 'Not existing asset account #' . random_int(1, 10000);
$action = new SetDestinationAccount($ruleAction);
$result = $action->act($journal);
$this->assertFalse($result);
@@ -134,7 +134,7 @@ class SetDestinationAccountTest extends TestCase
// fire the action:
$ruleAction = new RuleAction;
$ruleAction->action_value = 'Not existing expense account #' . random_int(1, 1000);
$ruleAction->action_value = 'Not existing expense account #' . random_int(1, 10000);
$action = new SetDestinationAccount($ruleAction);
$result = $action->act($journal);
@@ -202,7 +202,7 @@ class SetDestinationAccountTest extends TestCase
// fire the action:
$ruleAction = new RuleAction;
$ruleAction->action_value = 'Some new asset ' . random_int(1, 1000);
$ruleAction->action_value = 'Some new asset ' . random_int(1, 10000);
$action = new SetDestinationAccount($ruleAction);
$result = $action->act($journal);
$this->assertFalse($result);

View File

@@ -104,7 +104,7 @@ class SetSourceAccountTest extends TestCase
// fire the action:
$ruleAction = new RuleAction;
$ruleAction->action_value = 'Some new revenue #' . random_int(1, 1000);
$ruleAction->action_value = 'Some new revenue #' . random_int(1, 10000);
$action = new SetSourceAccount($ruleAction);
$result = $action->act($journal);
$this->assertTrue($result);
@@ -173,7 +173,7 @@ class SetSourceAccountTest extends TestCase
// fire the action:
$ruleAction = new RuleAction;
$ruleAction->action_value = 'Some new account #' . random_int(1, 1000);
$ruleAction->action_value = 'Some new account #' . random_int(1, 10000);
$action = new SetSourceAccount($ruleAction);
$result = $action->act($journal);
$this->assertFalse($result);
@@ -196,7 +196,7 @@ class SetSourceAccountTest extends TestCase
$accountRepos->shouldReceive('setUser');
// fire the action:
$ruleAction = new RuleAction;
$ruleAction->action_value = 'Some new asset ' . random_int(1, 1000);
$ruleAction->action_value = 'Some new asset ' . random_int(1, 10000);
$action = new SetSourceAccount($ruleAction);
$result = $action->act($journal);
$this->assertFalse($result);

View File

@@ -142,7 +142,7 @@ class AccountTransformerTest extends TestCase
'noteable_id' => $account->id,
'noteable_type' => Account::class,
'title' => null,
'text' => 'I am a note #' . random_int(1, 1000),
'text' => 'I am a note #' . random_int(1, 10000),
]
);
@@ -233,7 +233,7 @@ class AccountTransformerTest extends TestCase
'noteable_id' => $account->id,
'noteable_type' => Account::class,
'title' => null,
'text' => 'I am a note #' . random_int(1, 1000),
'text' => 'I am a note #' . random_int(1, 10000),
]
);
@@ -421,7 +421,7 @@ class AccountTransformerTest extends TestCase
'noteable_id' => $account->id,
'noteable_type' => Account::class,
'title' => null,
'text' => 'I am a note #' . random_int(1, 1000),
'text' => 'I am a note #' . random_int(1, 10000),
]
);

View File

@@ -44,7 +44,7 @@ class TagTransformerTest extends TestCase
$tag = Tag::create(
[
'user_id' => $this->user()->id,
'tag' => 'Some tag ' . random_int(1, 1000),
'tag' => 'Some tag ' . random_int(1, 10000),
'tagMode' => 'nothing',
'date' => '2018-01-01',
'description' => 'Some tag',

View File

@@ -280,7 +280,7 @@ class TransactionTransformerTest extends TestCase
$budget = Budget::create(
[
'user_id' => $this->user()->id,
'name' => 'Random budget #' . random_int(1, 1000),
'name' => 'Random budget #' . random_int(1, 10000),
'active' => 1,
]
);
@@ -464,7 +464,7 @@ class TransactionTransformerTest extends TestCase
$budget = Budget::create(
[
'user_id' => $this->user()->id,
'name' => 'Random budget #' . random_int(1, 1000),
'name' => 'Random budget #' . random_int(1, 10000),
'active' => 1,
]
);
@@ -566,7 +566,7 @@ class TransactionTransformerTest extends TestCase
$category = Category::create(
[
'user_id' => $this->user()->id,
'name' => 'Random category #' . random_int(1, 1000),
'name' => 'Random category #' . random_int(1, 10000),
'active' => 1,
]
);
@@ -1024,7 +1024,7 @@ class TransactionTransformerTest extends TestCase
$budget = Budget::create(
[
'user_id' => $this->user()->id,
'name' => 'Random budget #' . random_int(1, 1000),
'name' => 'Random budget #' . random_int(1, 10000),
'active' => 1,
]
);
@@ -1128,7 +1128,7 @@ class TransactionTransformerTest extends TestCase
$category = Category::create(
[
'user_id' => $this->user()->id,
'name' => 'Random category #' . random_int(1, 1000),
'name' => 'Random category #' . random_int(1, 10000),
'active' => 1,
]
);