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

@@ -138,7 +138,7 @@ class AttachmentControllerTest extends TestCase
'user_id' => $this->user()->id, 'user_id' => $this->user()->id,
'attachable_id' => 1, 'attachable_id' => 1,
'attachable_type' => TransactionJournal::class, 'attachable_type' => TransactionJournal::class,
'md5' => md5('Hello' . random_int(1, 1000)), 'md5' => md5('Hello' . random_int(1, 10000)),
'filename' => 'some name', 'filename' => 'some name',
'mime' => 'text/plain', 'mime' => 'text/plain',
'size' => 5, 'size' => 5,
@@ -230,7 +230,7 @@ class AttachmentControllerTest extends TestCase
// data to submit // data to submit
$data = [ $data = [
'filename' => 'Some new att', 'filename' => 'Some new att',
'description' => sprintf('Attempt #%d', random_int(1, 1000)), 'description' => sprintf('Attempt #%d', random_int(1, 10000)),
'model' => TransactionJournal::class, 'model' => TransactionJournal::class,
'model_id' => 1, 'model_id' => 1,
]; ];
@@ -265,7 +265,7 @@ class AttachmentControllerTest extends TestCase
// data to submit // data to submit
$data = [ $data = [
'filename' => $attachment->filename, 'filename' => $attachment->filename,
'description' => sprintf('Attempt #%d', random_int(1, 1000)), 'description' => sprintf('Attempt #%d', random_int(1, 10000)),
'model' => TransactionJournal::class, 'model' => TransactionJournal::class,
'model_id' => 1, 'model_id' => 1,
]; ];

View File

@@ -142,8 +142,8 @@ class BillControllerTest extends TestCase
// data to submit: // data to submit:
$data = [ $data = [
'name' => 'New bill #' . random_int(1, 1000), 'name' => 'New bill #' . random_int(1, 10000),
'match' => 'some,words,' . random_int(1, 1000), 'match' => 'some,words,' . random_int(1, 10000),
'amount_min' => '66.34', 'amount_min' => '66.34',
'amount_max' => '45.67', 'amount_max' => '45.67',
'date' => '2018-01-01', 'date' => '2018-01-01',
@@ -187,8 +187,8 @@ class BillControllerTest extends TestCase
$repository->shouldReceive('getRulesForBill')->withAnyArgs()->andReturn(new Collection()); $repository->shouldReceive('getRulesForBill')->withAnyArgs()->andReturn(new Collection());
// data to submit: // data to submit:
$data = [ $data = [
'name' => 'New bill #' . random_int(1, 1000), 'name' => 'New bill #' . random_int(1, 10000),
'match' => 'some,words,' . random_int(1, 1000), 'match' => 'some,words,' . random_int(1, 10000),
'amount_min' => '12.34', 'amount_min' => '12.34',
'amount_max' => '45.67', 'amount_max' => '45.67',
'date' => '2018-01-01', 'date' => '2018-01-01',
@@ -226,8 +226,8 @@ class BillControllerTest extends TestCase
$repository->shouldReceive('getRulesForBill')->withAnyArgs()->andReturn(new Collection()); $repository->shouldReceive('getRulesForBill')->withAnyArgs()->andReturn(new Collection());
// data to submit: // data to submit:
$data = [ $data = [
'name' => 'New bill #' . random_int(1, 1000), 'name' => 'New bill #' . random_int(1, 10000),
'match' => 'some,words,' . random_int(1, 1000), 'match' => 'some,words,' . random_int(1, 10000),
'amount_min' => '12.34', 'amount_min' => '12.34',
'amount_max' => '45.67', 'amount_max' => '45.67',
'date' => '2018-01-01', 'date' => '2018-01-01',

View File

@@ -96,7 +96,7 @@ class TransactionControllerTest extends TestCase
$data = [ $data = [
'description' => 'Some transaction #' . random_int(1, 1000), 'description' => 'Some transaction #' . random_int(1, 10000),
'date' => '2018-01-01', 'date' => '2018-01-01',
'type' => 'withdrawal', 'type' => 'withdrawal',
'transactions' => [ 'transactions' => [
@@ -142,7 +142,7 @@ class TransactionControllerTest extends TestCase
$accountRepos->shouldReceive('getAccountsById')->andReturn(new Collection([$account])); $accountRepos->shouldReceive('getAccountsById')->andReturn(new Collection([$account]));
$data = [ $data = [
'description' => 'Some transaction #' . random_int(1, 1000), 'description' => 'Some transaction #' . random_int(1, 10000),
'date' => '2018-01-01', 'date' => '2018-01-01',
'type' => 'withdrawal', 'type' => 'withdrawal',
'transactions' => [ 'transactions' => [
@@ -240,7 +240,7 @@ class TransactionControllerTest extends TestCase
$accountRepos->shouldReceive('getAccountsById')->andReturn(new Collection([$account])); $accountRepos->shouldReceive('getAccountsById')->andReturn(new Collection([$account]));
$data = [ $data = [
'description' => 'Split journal #' . random_int(1, 1000), 'description' => 'Split journal #' . random_int(1, 10000),
'date' => '2018-01-01', 'date' => '2018-01-01',
'type' => 'withdrawal', 'type' => 'withdrawal',
'transactions' => [ 'transactions' => [
@@ -298,7 +298,7 @@ class TransactionControllerTest extends TestCase
$accountRepos->shouldReceive('getAccountsById')->andReturn(new Collection([$account])); $accountRepos->shouldReceive('getAccountsById')->andReturn(new Collection([$account]));
$data = [ $data = [
'description' => 'Some transaction #' . random_int(1, 1000), 'description' => 'Some transaction #' . random_int(1, 10000),
'date' => '2018-01-01', 'date' => '2018-01-01',
'type' => 'withdrawal', 'type' => 'withdrawal',
'transactions' => [ 'transactions' => [
@@ -345,7 +345,7 @@ class TransactionControllerTest extends TestCase
$accountRepos->shouldReceive('findByName')->andReturn(null); $accountRepos->shouldReceive('findByName')->andReturn(null);
$data = [ $data = [
'description' => 'Some transaction #' . random_int(1, 1000), 'description' => 'Some transaction #' . random_int(1, 10000),
'date' => '2018-01-01', 'date' => '2018-01-01',
'type' => 'withdrawal', 'type' => 'withdrawal',
'transactions' => [ 'transactions' => [
@@ -390,7 +390,7 @@ class TransactionControllerTest extends TestCase
$accountRepos->shouldReceive('setUser'); $accountRepos->shouldReceive('setUser');
$data = [ $data = [
'description' => 'Some transaction #' . random_int(1, 1000), 'description' => 'Some transaction #' . random_int(1, 10000),
'date' => '2018-01-01', 'date' => '2018-01-01',
'type' => 'withdrawal', 'type' => 'withdrawal',
'transactions' => [ 'transactions' => [
@@ -434,7 +434,7 @@ class TransactionControllerTest extends TestCase
$accountRepos->shouldReceive('setUser'); $accountRepos->shouldReceive('setUser');
$data = [ $data = [
'description' => 'Some transaction #' . random_int(1, 1000), 'description' => 'Some transaction #' . random_int(1, 10000),
'date' => '2018-01-01', 'date' => '2018-01-01',
'type' => 'withdrawal', 'type' => 'withdrawal',
'transactions' => [], 'transactions' => [],
@@ -474,7 +474,7 @@ class TransactionControllerTest extends TestCase
$data = [ $data = [
'description' => 'Split journal #' . random_int(1, 1000), 'description' => 'Split journal #' . random_int(1, 10000),
'date' => '2018-01-01', 'date' => '2018-01-01',
'type' => 'withdrawal', 'type' => 'withdrawal',
'transactions' => [ 'transactions' => [
@@ -524,7 +524,7 @@ class TransactionControllerTest extends TestCase
$data = [ $data = [
'description' => 'Some transaction #' . random_int(1, 1000), 'description' => 'Some transaction #' . random_int(1, 10000),
'date' => '2018-01-01', 'date' => '2018-01-01',
'type' => 'withdrawal', 'type' => 'withdrawal',
'transactions' => [ 'transactions' => [
@@ -580,7 +580,7 @@ class TransactionControllerTest extends TestCase
// submit with another account. // submit with another account.
$data = [ $data = [
'description' => 'Some transaction #' . random_int(1, 1000), 'description' => 'Some transaction #' . random_int(1, 10000),
'date' => '2018-01-01', 'date' => '2018-01-01',
'type' => 'withdrawal', 'type' => 'withdrawal',
'bill_id' => $bill->id, 'bill_id' => $bill->id,
@@ -638,7 +638,7 @@ class TransactionControllerTest extends TestCase
// submit with another account. // submit with another account.
$data = [ $data = [
'description' => 'Some transaction #' . random_int(1, 1000), 'description' => 'Some transaction #' . random_int(1, 10000),
'date' => '2018-01-01', 'date' => '2018-01-01',
'type' => 'withdrawal', 'type' => 'withdrawal',
'bill_name' => $bill->name, 'bill_name' => $bill->name,
@@ -696,7 +696,7 @@ class TransactionControllerTest extends TestCase
// submit with another account. // submit with another account.
$data = [ $data = [
'description' => 'Some transaction #' . random_int(1, 1000), 'description' => 'Some transaction #' . random_int(1, 10000),
'date' => '2018-01-01', 'date' => '2018-01-01',
'type' => 'withdrawal', 'type' => 'withdrawal',
'transactions' => [ 'transactions' => [
@@ -754,7 +754,7 @@ class TransactionControllerTest extends TestCase
// submit with another account. // submit with another account.
$data = [ $data = [
'description' => 'Some transaction #' . random_int(1, 1000), 'description' => 'Some transaction #' . random_int(1, 10000),
'date' => '2018-01-01', 'date' => '2018-01-01',
'type' => 'withdrawal', 'type' => 'withdrawal',
'transactions' => [ 'transactions' => [
@@ -812,7 +812,7 @@ class TransactionControllerTest extends TestCase
// submit with another account. // submit with another account.
$data = [ $data = [
'description' => 'Some transaction #' . random_int(1, 1000), 'description' => 'Some transaction #' . random_int(1, 10000),
'date' => '2018-01-01', 'date' => '2018-01-01',
'type' => 'withdrawal', 'type' => 'withdrawal',
'transactions' => [ 'transactions' => [
@@ -876,7 +876,7 @@ class TransactionControllerTest extends TestCase
// submit with another account. // submit with another account.
$data = [ $data = [
'description' => 'Some transaction #' . random_int(1, 1000), 'description' => 'Some transaction #' . random_int(1, 10000),
'date' => '2018-01-01', 'date' => '2018-01-01',
'type' => 'withdrawal', 'type' => 'withdrawal',
'piggy_bank_id' => $piggyBank->id, 'piggy_bank_id' => $piggyBank->id,
@@ -942,7 +942,7 @@ class TransactionControllerTest extends TestCase
// submit with another account. // submit with another account.
$data = [ $data = [
'description' => 'Some transaction #' . random_int(1, 1000), 'description' => 'Some transaction #' . random_int(1, 10000),
'date' => '2018-01-01', 'date' => '2018-01-01',
'type' => 'withdrawal', 'type' => 'withdrawal',
'piggy_bank_name' => $piggyBank->name, 'piggy_bank_name' => $piggyBank->name,
@@ -996,7 +996,7 @@ class TransactionControllerTest extends TestCase
$accountRepos->shouldReceive('getAccountsById')->andReturn(new Collection([$account])); $accountRepos->shouldReceive('getAccountsById')->andReturn(new Collection([$account]));
$data = [ $data = [
'description' => 'Some transaction #' . random_int(1, 1000), 'description' => 'Some transaction #' . random_int(1, 10000),
'date' => '2018-01-01', 'date' => '2018-01-01',
'type' => 'deposit', 'type' => 'deposit',
'transactions' => [ 'transactions' => [
@@ -1045,7 +1045,7 @@ class TransactionControllerTest extends TestCase
$data = [ $data = [
'description' => 'Some deposit #' . random_int(1, 1000), 'description' => 'Some deposit #' . random_int(1, 10000),
'date' => '2018-01-01', 'date' => '2018-01-01',
'type' => 'deposit', 'type' => 'deposit',
'transactions' => [ 'transactions' => [
@@ -1101,7 +1101,7 @@ class TransactionControllerTest extends TestCase
$accountRepos->shouldReceive('getAccountsById')->andReturn(new Collection([$account]), new Collection([$second])); $accountRepos->shouldReceive('getAccountsById')->andReturn(new Collection([$account]), new Collection([$second]));
$data = [ $data = [
'description' => 'Some transfer #' . random_int(1, 1000), 'description' => 'Some transfer #' . random_int(1, 10000),
'date' => '2018-01-01', 'date' => '2018-01-01',
'type' => 'transfer', 'type' => 'transfer',
'transactions' => [ 'transactions' => [
@@ -1165,7 +1165,7 @@ class TransactionControllerTest extends TestCase
$accountRepos->shouldReceive('getAccountsById')->andReturn(new Collection([$account]), new Collection([$second])); $accountRepos->shouldReceive('getAccountsById')->andReturn(new Collection([$account]), new Collection([$second]));
$data = [ $data = [
'description' => 'Some transaction #' . random_int(1, 1000), 'description' => 'Some transaction #' . random_int(1, 10000),
'date' => '2018-01-01', 'date' => '2018-01-01',
'type' => 'withdrawal', 'type' => 'withdrawal',
'transactions' => [ 'transactions' => [
@@ -1479,7 +1479,7 @@ class TransactionControllerTest extends TestCase
$bill = $this->user()->bills()->first(); $bill = $this->user()->bills()->first();
$data = [ $data = [
'description' => 'Some transaction #' . random_int(1, 1000), 'description' => 'Some transaction #' . random_int(1, 10000),
'date' => '2018-01-01', 'date' => '2018-01-01',
'type' => 'withdrawal', 'type' => 'withdrawal',
'bill_id' => $bill->id, 'bill_id' => $bill->id,
@@ -1520,7 +1520,7 @@ class TransactionControllerTest extends TestCase
$bill = $this->user()->bills()->first(); $bill = $this->user()->bills()->first();
$data = [ $data = [
'description' => 'Some transaction #' . random_int(1, 1000), 'description' => 'Some transaction #' . random_int(1, 10000),
'date' => '2018-01-01', 'date' => '2018-01-01',
'type' => 'withdrawal', 'type' => 'withdrawal',
'bill_name' => $bill->name, 'bill_name' => $bill->name,
@@ -1559,7 +1559,7 @@ class TransactionControllerTest extends TestCase
$journalRepos->shouldReceive('store')->andReturn($journal)->once(); $journalRepos->shouldReceive('store')->andReturn($journal)->once();
$data = [ $data = [
'description' => 'Some transaction #' . random_int(1, 1000), 'description' => 'Some transaction #' . random_int(1, 10000),
'date' => '2018-01-01', 'date' => '2018-01-01',
'type' => 'withdrawal', 'type' => 'withdrawal',
'transactions' => [ 'transactions' => [
@@ -1567,7 +1567,7 @@ class TransactionControllerTest extends TestCase
'amount' => '10', 'amount' => '10',
'currency_id' => 1, 'currency_id' => 1,
'source_id' => $account->id, 'source_id' => $account->id,
'destination_name' => 'New expense account #' . random_int(1, 1000), 'destination_name' => 'New expense account #' . random_int(1, 10000),
], ],
@@ -1600,7 +1600,7 @@ class TransactionControllerTest extends TestCase
$journalRepos->shouldReceive('store')->andReturn($journal)->once(); $journalRepos->shouldReceive('store')->andReturn($journal)->once();
$data = [ $data = [
'description' => 'Some transaction #' . random_int(1, 1000), 'description' => 'Some transaction #' . random_int(1, 10000),
'date' => '2018-01-01', 'date' => '2018-01-01',
'type' => 'withdrawal', 'type' => 'withdrawal',
'transactions' => [ 'transactions' => [
@@ -1639,7 +1639,7 @@ class TransactionControllerTest extends TestCase
$journalRepos->shouldReceive('store')->andReturn($journal)->once(); $journalRepos->shouldReceive('store')->andReturn($journal)->once();
$data = [ $data = [
'description' => 'Some transaction #' . random_int(1, 1000), 'description' => 'Some transaction #' . random_int(1, 10000),
'date' => '2018-01-01', 'date' => '2018-01-01',
'type' => 'withdrawal', 'type' => 'withdrawal',
'transactions' => [ 'transactions' => [
@@ -1680,7 +1680,7 @@ class TransactionControllerTest extends TestCase
$data = [ $data = [
'description' => 'Some transaction #' . random_int(1, 1000), 'description' => 'Some transaction #' . random_int(1, 10000),
'date' => '2018-01-01', 'date' => '2018-01-01',
'type' => 'withdrawal', 'type' => 'withdrawal',
'transactions' => [ 'transactions' => [
@@ -1719,7 +1719,7 @@ class TransactionControllerTest extends TestCase
$journalRepos->shouldReceive('store')->andReturn($journal)->once(); $journalRepos->shouldReceive('store')->andReturn($journal)->once();
$data = [ $data = [
'description' => 'Some transaction #' . random_int(1, 1000), 'description' => 'Some transaction #' . random_int(1, 10000),
'date' => '2018-01-01', 'date' => '2018-01-01',
'type' => 'deposit', 'type' => 'deposit',
'transactions' => [ 'transactions' => [
@@ -1757,7 +1757,7 @@ class TransactionControllerTest extends TestCase
$accountRepos->shouldReceive('getAccountsById')->andReturn(new Collection([$account])); $accountRepos->shouldReceive('getAccountsById')->andReturn(new Collection([$account]));
$journalRepos->shouldReceive('store')->andReturn($journal)->once(); $journalRepos->shouldReceive('store')->andReturn($journal)->once();
$data = [ $data = [
'description' => 'Some transaction #' . random_int(1, 1000), 'description' => 'Some transaction #' . random_int(1, 10000),
'date' => '2018-01-01', 'date' => '2018-01-01',
'type' => 'withdrawal', 'type' => 'withdrawal',
'transactions' => [ 'transactions' => [
@@ -1797,7 +1797,7 @@ class TransactionControllerTest extends TestCase
$journalRepos->shouldReceive('store')->andReturn($journal)->once(); $journalRepos->shouldReceive('store')->andReturn($journal)->once();
$data = [ $data = [
'description' => 'Some transaction #' . random_int(1, 1000), 'description' => 'Some transaction #' . random_int(1, 10000),
'date' => '2018-01-01', 'date' => '2018-01-01',
'type' => 'withdrawal', 'type' => 'withdrawal',
'transactions' => [ 'transactions' => [
@@ -1836,7 +1836,7 @@ class TransactionControllerTest extends TestCase
$accountRepos->shouldReceive('getAccountsById')->andReturn(new Collection([$account])); $accountRepos->shouldReceive('getAccountsById')->andReturn(new Collection([$account]));
$journalRepos->shouldReceive('store')->andReturn($journal)->once(); $journalRepos->shouldReceive('store')->andReturn($journal)->once();
$data = [ $data = [
'description' => 'Some transaction #' . random_int(1, 1000), 'description' => 'Some transaction #' . random_int(1, 10000),
'date' => '2018-01-01', 'date' => '2018-01-01',
'type' => 'withdrawal', 'type' => 'withdrawal',
'transactions' => [ 'transactions' => [
@@ -1875,7 +1875,7 @@ class TransactionControllerTest extends TestCase
$accountRepos->shouldReceive('getAccountsById')->andReturn(new Collection([$account])); $accountRepos->shouldReceive('getAccountsById')->andReturn(new Collection([$account]));
$journalRepos->shouldReceive('store')->andReturn($journal)->once(); $journalRepos->shouldReceive('store')->andReturn($journal)->once();
$data = [ $data = [
'description' => 'Some transaction #' . random_int(1, 1000), 'description' => 'Some transaction #' . random_int(1, 10000),
'date' => '2018-01-01', 'date' => '2018-01-01',
'type' => 'withdrawal', 'type' => 'withdrawal',
'transactions' => [ 'transactions' => [
@@ -1915,7 +1915,7 @@ class TransactionControllerTest extends TestCase
$accountRepos->shouldReceive('getAccountsById')->andReturn(new Collection([$account])); $accountRepos->shouldReceive('getAccountsById')->andReturn(new Collection([$account]));
$journalRepos->shouldReceive('store')->andReturn($journal)->once(); $journalRepos->shouldReceive('store')->andReturn($journal)->once();
$data = [ $data = [
'description' => 'Some transaction #' . random_int(1, 1000), 'description' => 'Some transaction #' . random_int(1, 10000),
'date' => '2018-01-01', 'date' => '2018-01-01',
'type' => 'withdrawal', 'type' => 'withdrawal',
'transactions' => [ 'transactions' => [
@@ -1954,7 +1954,7 @@ class TransactionControllerTest extends TestCase
$accountRepos->shouldReceive('getAccountsById')->andReturn(new Collection([$account])); $accountRepos->shouldReceive('getAccountsById')->andReturn(new Collection([$account]));
$journalRepos->shouldReceive('store')->andReturn($journal)->once(); $journalRepos->shouldReceive('store')->andReturn($journal)->once();
$data = [ $data = [
'description' => 'Some transaction #' . random_int(1, 1000), 'description' => 'Some transaction #' . random_int(1, 10000),
'date' => '2018-01-01', 'date' => '2018-01-01',
'type' => 'withdrawal', 'type' => 'withdrawal',
// store date meta fields (if present): // store date meta fields (if present):
@@ -1999,9 +1999,9 @@ class TransactionControllerTest extends TestCase
$accountRepos->shouldReceive('getAccountsById')->andReturn(new Collection([$account])); $accountRepos->shouldReceive('getAccountsById')->andReturn(new Collection([$account]));
$journalRepos->shouldReceive('store')->andReturn($journal)->once(); $journalRepos->shouldReceive('store')->andReturn($journal)->once();
$name = 'Some new category #' . random_int(1, 1000); $name = 'Some new category #' . random_int(1, 10000);
$data = [ $data = [
'description' => 'Some transaction #' . random_int(1, 1000), 'description' => 'Some transaction #' . random_int(1, 10000),
'date' => '2018-01-01', 'date' => '2018-01-01',
'type' => 'withdrawal', 'type' => 'withdrawal',
'transactions' => [ 'transactions' => [
@@ -2041,7 +2041,7 @@ class TransactionControllerTest extends TestCase
$journalRepos->shouldReceive('store')->andReturn($journal)->once(); $journalRepos->shouldReceive('store')->andReturn($journal)->once();
$name = 'New opposing account #' . random_int(1, 10000); $name = 'New opposing account #' . random_int(1, 10000);
$data = [ $data = [
'description' => 'Some transaction #' . random_int(1, 1000), 'description' => 'Some transaction #' . random_int(1, 10000),
'date' => '2018-01-01', 'date' => '2018-01-01',
'type' => 'withdrawal', 'type' => 'withdrawal',
'transactions' => [ 'transactions' => [
@@ -2080,7 +2080,7 @@ class TransactionControllerTest extends TestCase
$journalRepos->shouldReceive('store')->andReturn($journal)->once(); $journalRepos->shouldReceive('store')->andReturn($journal)->once();
$data = [ $data = [
'description' => 'Some transaction #' . random_int(1, 1000), 'description' => 'Some transaction #' . random_int(1, 10000),
'date' => '2018-01-01', 'date' => '2018-01-01',
'type' => 'withdrawal', 'type' => 'withdrawal',
'notes' => 'I am a note', 'notes' => 'I am a note',
@@ -2119,7 +2119,7 @@ class TransactionControllerTest extends TestCase
$accountRepos->shouldReceive('getAccountsById')->andReturn(new Collection([$account]), new Collection([$opposing])); $accountRepos->shouldReceive('getAccountsById')->andReturn(new Collection([$account]), new Collection([$opposing]));
$journalRepos->shouldReceive('store')->andReturn($journal)->once(); $journalRepos->shouldReceive('store')->andReturn($journal)->once();
$data = [ $data = [
'description' => 'Some transaction #' . random_int(1, 1000), 'description' => 'Some transaction #' . random_int(1, 10000),
'date' => '2018-01-01', 'date' => '2018-01-01',
'type' => 'withdrawal', 'type' => 'withdrawal',
'transactions' => [ 'transactions' => [
@@ -2159,7 +2159,7 @@ class TransactionControllerTest extends TestCase
$journalRepos->shouldReceive('store')->andReturn($journal)->once(); $journalRepos->shouldReceive('store')->andReturn($journal)->once();
$data = [ $data = [
'description' => 'Some transaction #' . random_int(1, 1000), 'description' => 'Some transaction #' . random_int(1, 10000),
'date' => '2018-01-01', 'date' => '2018-01-01',
'type' => 'withdrawal', 'type' => 'withdrawal',
'transactions' => [ 'transactions' => [
@@ -2199,7 +2199,7 @@ class TransactionControllerTest extends TestCase
$journalRepos->shouldReceive('store')->andReturn($journal)->once(); $journalRepos->shouldReceive('store')->andReturn($journal)->once();
$piggy = $this->user()->piggyBanks()->first(); $piggy = $this->user()->piggyBanks()->first();
$data = [ $data = [
'description' => 'Some deposit #' . random_int(1, 1000), 'description' => 'Some deposit #' . random_int(1, 10000),
'date' => '2018-01-01', 'date' => '2018-01-01',
'type' => 'deposit', 'type' => 'deposit',
'piggy_bank_name' => $piggy->name, 'piggy_bank_name' => $piggy->name,
@@ -2240,7 +2240,7 @@ class TransactionControllerTest extends TestCase
$piggy = $this->user()->piggyBanks()->first(); $piggy = $this->user()->piggyBanks()->first();
$data = [ $data = [
'description' => 'Some transfer #' . random_int(1, 1000), 'description' => 'Some transfer #' . random_int(1, 10000),
'date' => '2018-01-01', 'date' => '2018-01-01',
'type' => 'transfer', 'type' => 'transfer',
'piggy_bank_id' => $piggy->id, 'piggy_bank_id' => $piggy->id,
@@ -2280,7 +2280,7 @@ class TransactionControllerTest extends TestCase
$piggy = $this->user()->piggyBanks()->first(); $piggy = $this->user()->piggyBanks()->first();
$data = [ $data = [
'description' => 'Some transfer #' . random_int(1, 1000), 'description' => 'Some transfer #' . random_int(1, 10000),
'date' => '2018-01-01', 'date' => '2018-01-01',
'type' => 'transfer', 'type' => 'transfer',
'piggy_bank_name' => $piggy->name, 'piggy_bank_name' => $piggy->name,
@@ -2316,7 +2316,7 @@ class TransactionControllerTest extends TestCase
$accountRepos->shouldReceive('getAccountsById')->andReturn(new Collection([$account])); $accountRepos->shouldReceive('getAccountsById')->andReturn(new Collection([$account]));
$journalRepos->shouldReceive('store')->andReturn($journal)->once(); $journalRepos->shouldReceive('store')->andReturn($journal)->once();
$data = [ $data = [
'description' => 'Some transaction #' . random_int(1, 1000), 'description' => 'Some transaction #' . random_int(1, 10000),
'date' => '2018-01-01', 'date' => '2018-01-01',
'type' => 'withdrawal', 'type' => 'withdrawal',
'transactions' => [ 'transactions' => [
@@ -2354,7 +2354,7 @@ class TransactionControllerTest extends TestCase
$accountRepos->shouldReceive('getAccountsById')->andReturn(new Collection([$account])); $accountRepos->shouldReceive('getAccountsById')->andReturn(new Collection([$account]));
$journalRepos->shouldReceive('store')->andReturn($journal)->once(); $journalRepos->shouldReceive('store')->andReturn($journal)->once();
$data = [ $data = [
'description' => 'Some transaction #' . random_int(1, 1000), 'description' => 'Some transaction #' . random_int(1, 10000),
'date' => '2018-01-01', 'date' => '2018-01-01',
'type' => 'withdrawal', 'type' => 'withdrawal',
'transactions' => [ 'transactions' => [
@@ -2392,9 +2392,9 @@ class TransactionControllerTest extends TestCase
public function testSuccessStoreTags(): void public function testSuccessStoreTags(): void
{ {
$tags = [ $tags = [
'TagOne' . random_int(1, 1000), 'TagOne' . random_int(1, 10000),
'TagTwoBlarg' . random_int(1, 1000), 'TagTwoBlarg' . random_int(1, 10000),
'SomeThreeTag' . random_int(1, 1000), 'SomeThreeTag' . random_int(1, 10000),
]; ];
$journal = $this->user()->transactionJournals()->first(); $journal = $this->user()->transactionJournals()->first();
$account = $this->user()->accounts()->where('account_type_id', 3)->first(); $account = $this->user()->accounts()->where('account_type_id', 3)->first();
@@ -2406,7 +2406,7 @@ class TransactionControllerTest extends TestCase
$accountRepos->shouldReceive('getAccountsById')->andReturn(new Collection([$account])); $accountRepos->shouldReceive('getAccountsById')->andReturn(new Collection([$account]));
$journalRepos->shouldReceive('store')->andReturn($journal)->once(); $journalRepos->shouldReceive('store')->andReturn($journal)->once();
$data = [ $data = [
'description' => 'Some transaction #' . random_int(1, 1000), 'description' => 'Some transaction #' . random_int(1, 10000),
'date' => '2018-01-01', 'date' => '2018-01-01',
'type' => 'withdrawal', 'type' => 'withdrawal',
'tags' => implode(',', $tags), 'tags' => implode(',', $tags),
@@ -2442,7 +2442,7 @@ class TransactionControllerTest extends TestCase
$accountRepos->shouldReceive('getAccountsById')->withArgs([[$account->id]])->andReturn(new Collection([$account])); $accountRepos->shouldReceive('getAccountsById')->withArgs([[$account->id]])->andReturn(new Collection([$account]));
$data = [ $data = [
'description' => 'Some deposit #' . random_int(1, 1000), 'description' => 'Some deposit #' . random_int(1, 10000),
'date' => '2018-01-01', 'date' => '2018-01-01',
'transactions' => [ 'transactions' => [
[ [
@@ -2484,7 +2484,7 @@ class TransactionControllerTest extends TestCase
$accountRepos->shouldReceive('getAccountsById')->withArgs([[$account->id]])->andReturn(new Collection([$account])); $accountRepos->shouldReceive('getAccountsById')->withArgs([[$account->id]])->andReturn(new Collection([$account]));
$data = [ $data = [
'description' => 'Some transaction #' . random_int(1, 1000), 'description' => 'Some transaction #' . random_int(1, 10000),
'date' => '2018-01-01', 'date' => '2018-01-01',
'transactions' => [ 'transactions' => [
[ [

View File

@@ -57,7 +57,7 @@ class UserControllerTest extends TestCase
public function testDelete(): void public function testDelete(): void
{ {
// create a user first: // create a user first:
$user = User::create(['email' => 'some@newu' . random_int(1, 1000) . 'ser.nl', 'password' => 'hello', 'blocked' => 0]); $user = User::create(['email' => 'some@newu' . random_int(1, 10000) . 'ser.nl', 'password' => 'hello', 'blocked' => 0]);
// call API // call API
$response = $this->delete('/api/v1/users/' . $user->id); $response = $this->delete('/api/v1/users/' . $user->id);
@@ -76,7 +76,7 @@ class UserControllerTest extends TestCase
Passport::actingAs($this->emptyUser()); Passport::actingAs($this->emptyUser());
// create a user first: // create a user first:
$user = User::create(['email' => 'some@newu' . random_int(1, 1000) . 'ser.nl', 'password' => 'hello', 'blocked' => 0]); $user = User::create(['email' => 'some@newu' . random_int(1, 10000) . 'ser.nl', 'password' => 'hello', 'blocked' => 0]);
// call API // call API
$response = $this->delete('/api/v1/users/' . $user->id); $response = $this->delete('/api/v1/users/' . $user->id);
@@ -137,7 +137,7 @@ class UserControllerTest extends TestCase
public function testStoreBasic(): void public function testStoreBasic(): void
{ {
$data = [ $data = [
'email' => 'some_new@user' . random_int(1, 1000) . '.com', 'email' => 'some_new@user' . random_int(1, 10000) . '.com',
'blocked' => 0, 'blocked' => 0,
]; ];
@@ -192,11 +192,11 @@ class UserControllerTest extends TestCase
public function testUpdate(): void public function testUpdate(): void
{ {
// create a user first: // create a user first:
$user = User::create(['email' => 'some@newu' . random_int(1, 1000) . 'ser.nl', 'password' => 'hello', 'blocked' => 0]); $user = User::create(['email' => 'some@newu' . random_int(1, 10000) . 'ser.nl', 'password' => 'hello', 'blocked' => 0]);
// data: // data:
$data = [ $data = [
'email' => 'some-new@email' . random_int(1, 1000) . '.com', 'email' => 'some-new@email' . random_int(1, 10000) . '.com',
'blocked' => 0, 'blocked' => 0,
]; ];

View File

@@ -162,9 +162,9 @@ class LinkControllerTest extends TestCase
{ {
$repository = $this->mock(LinkTypeRepositoryInterface::class); $repository = $this->mock(LinkTypeRepositoryInterface::class);
$data = [ $data = [
'name' => 'test ' . random_int(1, 1000), 'name' => 'test ' . random_int(1, 10000),
'inward' => 'test inward' . random_int(1, 1000), 'inward' => 'test inward' . random_int(1, 10000),
'outward' => 'test outward' . random_int(1, 1000), 'outward' => 'test outward' . random_int(1, 10000),
]; ];
$repository->shouldReceive('store')->once()->andReturn(LinkType::first()); $repository->shouldReceive('store')->once()->andReturn(LinkType::first());
$repository->shouldReceive('findNull')->andReturn(LinkType::first()); $repository->shouldReceive('findNull')->andReturn(LinkType::first());
@@ -184,9 +184,9 @@ class LinkControllerTest extends TestCase
{ {
$repository = $this->mock(LinkTypeRepositoryInterface::class); $repository = $this->mock(LinkTypeRepositoryInterface::class);
$data = [ $data = [
'name' => 'test ' . random_int(1, 1000), 'name' => 'test ' . random_int(1, 10000),
'inward' => 'test inward' . random_int(1, 1000), 'inward' => 'test inward' . random_int(1, 10000),
'outward' => 'test outward' . random_int(1, 1000), 'outward' => 'test outward' . random_int(1, 10000),
'create_another' => '1', 'create_another' => '1',
]; ];
$repository->shouldReceive('store')->once()->andReturn(new LinkType); $repository->shouldReceive('store')->once()->andReturn(new LinkType);
@@ -210,9 +210,9 @@ class LinkControllerTest extends TestCase
$repository->shouldReceive('update')->once()->andReturn(new $linkType); $repository->shouldReceive('update')->once()->andReturn(new $linkType);
$data = [ $data = [
'name' => 'test ' . random_int(1, 1000), 'name' => 'test ' . random_int(1, 10000),
'inward' => 'test inward' . random_int(1, 1000), 'inward' => 'test inward' . random_int(1, 10000),
'outward' => 'test outward' . random_int(1, 1000), 'outward' => 'test outward' . random_int(1, 10000),
]; ];
$this->session(['link_types.edit.uri' => 'http://localhost']); $this->session(['link_types.edit.uri' => 'http://localhost']);
$this->be($this->user()); $this->be($this->user());
@@ -231,9 +231,9 @@ class LinkControllerTest extends TestCase
$linkType = LinkType::where('editable', 0)->first(); $linkType = LinkType::where('editable', 0)->first();
$data = [ $data = [
'name' => 'test ' . random_int(1, 1000), 'name' => 'test ' . random_int(1, 10000),
'inward' => 'test inward' . random_int(1, 1000), 'inward' => 'test inward' . random_int(1, 10000),
'outward' => 'test outward' . random_int(1, 1000), 'outward' => 'test outward' . random_int(1, 10000),
'return_to_edit' => '1', 'return_to_edit' => '1',
]; ];
$this->session(['link_types.edit.uri' => 'http://localhost']); $this->session(['link_types.edit.uri' => 'http://localhost']);
@@ -254,9 +254,9 @@ class LinkControllerTest extends TestCase
$linkType = LinkType::create(['editable' => 1, 'inward' => 'healox', 'outward' => 'byaex', 'name' => 'Test tyapeX']); $linkType = LinkType::create(['editable' => 1, 'inward' => 'healox', 'outward' => 'byaex', 'name' => 'Test tyapeX']);
$data = [ $data = [
'name' => 'test ' . random_int(1, 1000), 'name' => 'test ' . random_int(1, 10000),
'inward' => 'test inward' . random_int(1, 1000), 'inward' => 'test inward' . random_int(1, 10000),
'outward' => 'test outward' . random_int(1, 1000), 'outward' => 'test outward' . random_int(1, 10000),
'return_to_edit' => '1', 'return_to_edit' => '1',
]; ];
$repository->shouldReceive('update')->once()->andReturn(new $linkType); $repository->shouldReceive('update')->once()->andReturn(new $linkType);

View File

@@ -209,7 +209,7 @@ class IndexControllerTest extends TestCase
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $job->user_id = $this->user()->id;
$job->key = 'dc_' . random_int(1, 1000); $job->key = 'dc_' . random_int(1, 10000);
$job->status = 'ready_to_run'; $job->status = 'ready_to_run';
$job->stage = 'go-for-import'; $job->stage = 'go-for-import';
$job->provider = 'file'; $job->provider = 'file';

View File

@@ -53,7 +53,7 @@ class JobConfigurationControllerTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $job->user_id = $this->user()->id;
$job->key = '1Afake_job_' . random_int(1, 1000); $job->key = '1Afake_job_' . random_int(1, 10000);
$job->status = 'has_prereq'; $job->status = 'has_prereq';
$job->provider = 'fake'; $job->provider = 'fake';
$job->file_type = ''; $job->file_type = '';
@@ -85,7 +85,7 @@ class JobConfigurationControllerTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $job->user_id = $this->user()->id;
$job->key = '2Bfake_job_' . random_int(1, 1000); $job->key = '2Bfake_job_' . random_int(1, 10000);
$job->status = 'some_bad_state'; $job->status = 'some_bad_state';
$job->provider = 'fake'; $job->provider = 'fake';
$job->file_type = ''; $job->file_type = '';
@@ -111,7 +111,7 @@ class JobConfigurationControllerTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $job->user_id = $this->user()->id;
$job->key = '3Cfake_job_' . random_int(1, 1000); $job->key = '3Cfake_job_' . random_int(1, 10000);
$job->status = 'has_prereq'; $job->status = 'has_prereq';
$job->provider = 'fake'; $job->provider = 'fake';
$job->file_type = ''; $job->file_type = '';
@@ -140,7 +140,7 @@ class JobConfigurationControllerTest extends TestCase
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $job->user_id = $this->user()->id;
$job->key = '4Dfake_job_' . random_int(1, 1000); $job->key = '4Dfake_job_' . random_int(1, 10000);
$job->status = 'has_prereq'; $job->status = 'has_prereq';
$job->provider = 'fake'; $job->provider = 'fake';
$job->file_type = ''; $job->file_type = '';
@@ -174,7 +174,7 @@ class JobConfigurationControllerTest extends TestCase
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $job->user_id = $this->user()->id;
$job->key = '5Ffake_job_' . random_int(1, 1000); $job->key = '5Ffake_job_' . random_int(1, 10000);
$job->status = 'some_bad_state'; $job->status = 'some_bad_state';
$job->provider = 'fake'; $job->provider = 'fake';
$job->file_type = ''; $job->file_type = '';
@@ -203,7 +203,7 @@ class JobConfigurationControllerTest extends TestCase
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $job->user_id = $this->user()->id;
$job->key = '6Efake_job_' . random_int(1, 1000); $job->key = '6Efake_job_' . random_int(1, 10000);
$job->status = 'has_prereq'; $job->status = 'has_prereq';
$job->provider = 'fake'; $job->provider = 'fake';
$job->file_type = ''; $job->file_type = '';
@@ -233,7 +233,7 @@ class JobConfigurationControllerTest extends TestCase
$file = UploadedFile::fake()->image('avatar.jpg'); $file = UploadedFile::fake()->image('avatar.jpg');
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $job->user_id = $this->user()->id;
$job->key = '7Dfake_job_' . random_int(1, 1000); $job->key = '7Dfake_job_' . random_int(1, 10000);
$job->status = 'has_prereq'; $job->status = 'has_prereq';
$job->provider = 'fake'; $job->provider = 'fake';
$job->file_type = ''; $job->file_type = '';

View File

@@ -58,7 +58,7 @@ class JobStatusControllerTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $job->user_id = $this->user()->id;
$job->key = 'Afake_job_' . random_int(1, 1000); $job->key = 'Afake_job_' . random_int(1, 10000);
$job->status = 'ready_to_run'; $job->status = 'ready_to_run';
$job->provider = 'fake'; $job->provider = 'fake';
$job->file_type = ''; $job->file_type = '';
@@ -78,7 +78,7 @@ class JobStatusControllerTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $job->user_id = $this->user()->id;
$job->key = 'Bfake_job_' . random_int(1, 1000); $job->key = 'Bfake_job_' . random_int(1, 10000);
$job->status = 'ready_to_run'; $job->status = 'ready_to_run';
$job->provider = 'file'; $job->provider = 'file';
$job->transactions = []; $job->transactions = [];
@@ -102,7 +102,7 @@ class JobStatusControllerTest extends TestCase
$tag = $this->user()->tags()->first(); $tag = $this->user()->tags()->first();
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $job->user_id = $this->user()->id;
$job->key = 'Cfake_job_' . random_int(1, 1000); $job->key = 'Cfake_job_' . random_int(1, 10000);
$job->status = 'ready_to_run'; $job->status = 'ready_to_run';
$job->provider = 'fake'; $job->provider = 'fake';
$job->transactions = []; $job->transactions = [];
@@ -132,7 +132,7 @@ class JobStatusControllerTest extends TestCase
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $job->user_id = $this->user()->id;
$job->key = 'Dfake_job_' . random_int(1, 1000); $job->key = 'Dfake_job_' . random_int(1, 10000);
$job->status = 'ready_to_run'; $job->status = 'ready_to_run';
$job->provider = 'fake'; $job->provider = 'fake';
$job->transactions = []; $job->transactions = [];
@@ -161,7 +161,7 @@ class JobStatusControllerTest extends TestCase
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $job->user_id = $this->user()->id;
$job->key = 'Efake_job_' . random_int(1, 1000); $job->key = 'Efake_job_' . random_int(1, 10000);
$job->status = 'ready_to_run'; $job->status = 'ready_to_run';
$job->provider = 'fake'; $job->provider = 'fake';
$job->transactions = []; $job->transactions = [];
@@ -185,7 +185,7 @@ class JobStatusControllerTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $job->user_id = $this->user()->id;
$job->key = 'Ffake_job_' . random_int(1, 1000); $job->key = 'Ffake_job_' . random_int(1, 10000);
$job->status = 'ready_to_run'; $job->status = 'ready_to_run';
$job->provider = 'fake'; $job->provider = 'fake';
$job->transactions = []; $job->transactions = [];
@@ -214,7 +214,7 @@ class JobStatusControllerTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $job->user_id = $this->user()->id;
$job->key = 'Gfake_job_' . random_int(1, 1000); $job->key = 'Gfake_job_' . random_int(1, 10000);
$job->status = 'ready_to_run'; $job->status = 'ready_to_run';
$job->provider = 'fake'; $job->provider = 'fake';
$job->transactions = []; $job->transactions = [];
@@ -244,7 +244,7 @@ class JobStatusControllerTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $job->user_id = $this->user()->id;
$job->key = 'Hfake_job_' . random_int(1, 1000); $job->key = 'Hfake_job_' . random_int(1, 10000);
$job->status = 'ready_to_run'; $job->status = 'ready_to_run';
$job->provider = 'fake'; $job->provider = 'fake';
$job->transactions = []; $job->transactions = [];
@@ -274,7 +274,7 @@ class JobStatusControllerTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $job->user_id = $this->user()->id;
$job->key = 'Ifake_job_' . random_int(1, 1000); $job->key = 'Ifake_job_' . random_int(1, 10000);
$job->status = 'bad_state'; $job->status = 'bad_state';
$job->provider = 'fake'; $job->provider = 'fake';
$job->transactions = []; $job->transactions = [];
@@ -295,7 +295,7 @@ class JobStatusControllerTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $job->user_id = $this->user()->id;
$job->key = 'Jfake_job_' . random_int(1, 1000); $job->key = 'Jfake_job_' . random_int(1, 10000);
$job->status = 'provider_finished'; $job->status = 'provider_finished';
$job->provider = 'fake'; $job->provider = 'fake';
$job->transactions = []; $job->transactions = [];
@@ -326,7 +326,7 @@ class JobStatusControllerTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $job->user_id = $this->user()->id;
$job->key = 'Lfake_job_' . random_int(1, 1000); $job->key = 'Lfake_job_' . random_int(1, 10000);
$job->status = 'provider_finished'; $job->status = 'provider_finished';
$job->provider = 'fake'; $job->provider = 'fake';
$job->transactions = []; $job->transactions = [];
@@ -357,7 +357,7 @@ class JobStatusControllerTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $job->user_id = $this->user()->id;
$job->key = 'Kfake_job_' . random_int(1, 1000); $job->key = 'Kfake_job_' . random_int(1, 10000);
$job->status = 'some_bad_state'; $job->status = 'some_bad_state';
$job->provider = 'fake'; $job->provider = 'fake';
$job->transactions = []; $job->transactions = [];

View File

@@ -55,7 +55,7 @@ class PrerequisitesControllerTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $job->user_id = $this->user()->id;
$job->key = 'A_pre_job_' . random_int(1, 1000); $job->key = 'A_pre_job_' . random_int(1, 10000);
$job->status = 'new'; $job->status = 'new';
$job->provider = 'fake'; $job->provider = 'fake';
$job->transactions = []; $job->transactions = [];
@@ -85,7 +85,7 @@ class PrerequisitesControllerTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $job->user_id = $this->user()->id;
$job->key = 'B_pre_job_' . random_int(1, 1000); $job->key = 'B_pre_job_' . random_int(1, 10000);
$job->status = 'some_Bad_state'; $job->status = 'some_Bad_state';
$job->provider = 'fake'; $job->provider = 'fake';
$job->transactions = []; $job->transactions = [];
@@ -105,7 +105,7 @@ class PrerequisitesControllerTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $job->user_id = $this->user()->id;
$job->key = 'C_pre_job_' . random_int(1, 1000); $job->key = 'C_pre_job_' . random_int(1, 10000);
$job->status = 'new'; $job->status = 'new';
$job->provider = 'fake'; $job->provider = 'fake';
$job->transactions = []; $job->transactions = [];
@@ -136,7 +136,7 @@ class PrerequisitesControllerTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $job->user_id = $this->user()->id;
$job->key = 'D_pre_job_' . random_int(1, 1000); $job->key = 'D_pre_job_' . random_int(1, 10000);
$job->status = 'new'; $job->status = 'new';
$job->provider = 'fake'; $job->provider = 'fake';
$job->transactions = []; $job->transactions = [];
@@ -166,7 +166,7 @@ class PrerequisitesControllerTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $job->user_id = $this->user()->id;
$job->key = 'D_pre_job_' . random_int(1, 1000); $job->key = 'D_pre_job_' . random_int(1, 10000);
$job->status = 'badstate'; $job->status = 'badstate';
$job->provider = 'fake'; $job->provider = 'fake';
$job->transactions = []; $job->transactions = [];
@@ -213,7 +213,7 @@ class PrerequisitesControllerTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $job->user_id = $this->user()->id;
$job->key = 'D_pre_job_' . random_int(1, 1000); $job->key = 'D_pre_job_' . random_int(1, 10000);
$job->status = 'new'; $job->status = 'new';
$job->provider = 'fake'; $job->provider = 'fake';
$job->transactions = []; $job->transactions = [];

View File

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

View File

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

View File

@@ -91,7 +91,7 @@ class BudgetFactoryTest extends TestCase
/** @var BudgetFactory $factory */ /** @var BudgetFactory $factory */
$factory = app(BudgetFactory::class); $factory = app(BudgetFactory::class);
$factory->setUser($this->user()); $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 public function testFindOrCreateNewName(): void
{ {
$name = 'Some new category #' . random_int(1, 1000); $name = 'Some new category #' . random_int(1, 10000);
/** @var CategoryFactory $factory */ /** @var CategoryFactory $factory */
$factory = app(CategoryFactory::class); $factory = app(CategoryFactory::class);

View File

@@ -91,6 +91,6 @@ class PiggyBankFactoryTest extends TestCase
/** @var PiggyBankFactory $factory */ /** @var PiggyBankFactory $factory */
$factory = app(PiggyBankFactory::class); $factory = app(PiggyBankFactory::class);
$factory->setUser($this->user()); $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 public function testFindOrCreateNew(): void
{ {
$tag = 'Some new tag#' . random_int(1, 1000); $tag = 'Some new tag#' . random_int(1, 10000);
/** @var TagFactory $factory */ /** @var TagFactory $factory */
$factory = app(TagFactory::class); $factory = app(TagFactory::class);
$factory->setUser($this->user()); $factory->setUser($this->user());

View File

@@ -43,7 +43,7 @@ class FakeJobConfigurationTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $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->status = 'new';
$job->stage = 'new'; $job->stage = 'new';
$job->provider = 'fake'; $job->provider = 'fake';
@@ -66,7 +66,7 @@ class FakeJobConfigurationTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $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->status = 'new';
$job->stage = 'needs_config'; $job->stage = 'needs_config';
$job->provider = 'fake'; $job->provider = 'fake';
@@ -89,7 +89,7 @@ class FakeJobConfigurationTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $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->status = 'new';
$job->stage = 'new'; $job->stage = 'new';
$job->provider = 'fake'; $job->provider = 'fake';
@@ -114,7 +114,7 @@ class FakeJobConfigurationTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $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->status = 'new';
$job->stage = 'config'; $job->stage = 'config';
$job->provider = 'fake'; $job->provider = 'fake';
@@ -142,7 +142,7 @@ class FakeJobConfigurationTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $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->status = 'new';
$job->stage = 'new'; $job->stage = 'new';
$job->provider = 'fake'; $job->provider = 'fake';
@@ -169,7 +169,7 @@ class FakeJobConfigurationTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $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->status = 'new';
$job->stage = 'config'; $job->stage = 'config';
$job->provider = 'fake'; $job->provider = 'fake';
@@ -197,7 +197,7 @@ class FakeJobConfigurationTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $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->status = 'new';
$job->stage = 'new'; $job->stage = 'new';
$job->provider = 'fake'; $job->provider = 'fake';
@@ -224,7 +224,7 @@ class FakeJobConfigurationTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $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->status = 'new';
$job->stage = 'new'; $job->stage = 'new';
$job->provider = 'fake'; $job->provider = 'fake';
@@ -259,7 +259,7 @@ class FakeJobConfigurationTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $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->status = 'new';
$job->stage = 'new'; $job->stage = 'new';
$job->provider = 'fake'; $job->provider = 'fake';
@@ -294,7 +294,7 @@ class FakeJobConfigurationTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $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->status = 'new';
$job->stage = 'new'; $job->stage = 'new';
$job->provider = 'fake'; $job->provider = 'fake';
@@ -329,7 +329,7 @@ class FakeJobConfigurationTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $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->status = 'new';
$job->stage = 'new'; $job->stage = 'new';
$job->provider = 'fake'; $job->provider = 'fake';
@@ -364,7 +364,7 @@ class FakeJobConfigurationTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $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->status = 'new';
$job->stage = 'new'; $job->stage = 'new';
$job->provider = 'fake'; $job->provider = 'fake';
@@ -399,7 +399,7 @@ class FakeJobConfigurationTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $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->status = 'new';
$job->stage = 'new'; $job->stage = 'new';
$job->provider = 'fake'; $job->provider = 'fake';
@@ -434,7 +434,7 @@ class FakeJobConfigurationTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $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->status = 'new';
$job->stage = 'new'; $job->stage = 'new';
$job->provider = 'fake'; $job->provider = 'fake';
@@ -469,7 +469,7 @@ class FakeJobConfigurationTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $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->status = 'new';
$job->stage = 'new'; $job->stage = 'new';
$job->provider = 'fake'; $job->provider = 'fake';
@@ -504,7 +504,7 @@ class FakeJobConfigurationTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $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->status = 'new';
$job->stage = 'not_new'; $job->stage = 'not_new';
$job->provider = 'fake'; $job->provider = 'fake';
@@ -528,7 +528,7 @@ class FakeJobConfigurationTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $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->status = 'new';
$job->stage = 'new'; $job->stage = 'new';
$job->provider = 'fake'; $job->provider = 'fake';
@@ -552,7 +552,7 @@ class FakeJobConfigurationTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $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->status = 'new';
$job->stage = 'new'; $job->stage = 'new';
$job->provider = 'fake'; $job->provider = 'fake';
@@ -576,7 +576,7 @@ class FakeJobConfigurationTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $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->status = 'new';
$job->stage = 'new'; $job->stage = 'new';
$job->provider = 'fake'; $job->provider = 'fake';

View File

@@ -49,7 +49,7 @@ class FileJobConfigurationTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $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->status = 'new';
$job->stage = 'new'; $job->stage = 'new';
$job->provider = 'fake'; $job->provider = 'fake';
@@ -72,7 +72,7 @@ class FileJobConfigurationTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $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->status = 'new';
$job->stage = 'ready_to_run'; $job->stage = 'ready_to_run';
$job->provider = 'fake'; $job->provider = 'fake';
@@ -95,7 +95,7 @@ class FileJobConfigurationTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $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->status = 'new';
$job->stage = 'map'; $job->stage = 'map';
$job->provider = 'file'; $job->provider = 'file';
@@ -130,7 +130,7 @@ class FileJobConfigurationTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $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->status = 'new';
$job->stage = 'configure-upload'; $job->stage = 'configure-upload';
$job->provider = 'file'; $job->provider = 'file';
@@ -163,7 +163,7 @@ class FileJobConfigurationTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $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->status = 'new';
$job->stage = 'map'; $job->stage = 'map';
$job->provider = 'file'; $job->provider = 'file';
@@ -196,7 +196,7 @@ class FileJobConfigurationTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $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->status = 'new';
$job->stage = 'new'; $job->stage = 'new';
$job->provider = 'file'; $job->provider = 'file';
@@ -229,7 +229,7 @@ class FileJobConfigurationTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $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->status = 'new';
$job->stage = 'roles'; $job->stage = 'roles';
$job->provider = 'file'; $job->provider = 'file';
@@ -262,7 +262,7 @@ class FileJobConfigurationTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $job->user_id = $this->user()->id;
$job->key = 'Dfile_' . random_int(1, 1000); $job->key = 'DfiHle_' . random_int(1, 10000);
$job->status = 'new'; $job->status = 'new';
$job->stage = 'configure-upload'; $job->stage = 'configure-upload';
$job->provider = 'file'; $job->provider = 'file';
@@ -290,7 +290,7 @@ class FileJobConfigurationTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $job->user_id = $this->user()->id;
$job->key = 'Ffile_' . random_int(1, 1000); $job->key = 'FfilIe_' . random_int(1, 10000);
$job->status = 'new'; $job->status = 'new';
$job->stage = 'map'; $job->stage = 'map';
$job->provider = 'file'; $job->provider = 'file';
@@ -318,7 +318,7 @@ class FileJobConfigurationTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $job->user_id = $this->user()->id;
$job->key = 'Cfile_' . random_int(1, 1000); $job->key = 'CfJile_' . random_int(1, 10000);
$job->status = 'new'; $job->status = 'new';
$job->stage = 'new'; $job->stage = 'new';
$job->provider = 'file'; $job->provider = 'file';
@@ -346,7 +346,7 @@ class FileJobConfigurationTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $job->user_id = $this->user()->id;
$job->key = 'Efile_' . random_int(1, 1000); $job->key = 'EfiKle_' . random_int(1, 10000);
$job->status = 'new'; $job->status = 'new';
$job->stage = 'roles'; $job->stage = 'roles';
$job->provider = 'file'; $job->provider = 'file';

View File

@@ -46,7 +46,7 @@ class SpectreJobConfigurationTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $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->status = 'new';
$job->stage = 'new'; $job->stage = 'new';
$job->provider = 'spectre'; $job->provider = 'spectre';
@@ -75,7 +75,7 @@ class SpectreJobConfigurationTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $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->status = 'new';
$job->stage = 'do-authenticate'; $job->stage = 'do-authenticate';
$job->provider = 'spectre'; $job->provider = 'spectre';
@@ -107,7 +107,7 @@ class SpectreJobConfigurationTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $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->status = 'new';
$job->stage = 'choose-login'; $job->stage = 'choose-login';
$job->provider = 'spectre'; $job->provider = 'spectre';
@@ -137,7 +137,7 @@ class SpectreJobConfigurationTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $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->status = 'new';
$job->stage = 'authenticated'; $job->stage = 'authenticated';
$job->provider = 'spectre'; $job->provider = 'spectre';
@@ -166,7 +166,7 @@ class SpectreJobConfigurationTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $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->status = 'new';
$job->stage = 'choose-accounts'; $job->stage = 'choose-accounts';
$job->provider = 'spectre'; $job->provider = 'spectre';

View File

@@ -45,7 +45,7 @@ class BunqRoutineTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $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->status = 'ready_to_run';
$job->stage = 'go-for-import'; $job->stage = 'go-for-import';
$job->provider = 'bunq'; $job->provider = 'bunq';
@@ -84,7 +84,7 @@ class BunqRoutineTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $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->status = 'ready_to_run';
$job->stage = 'new'; $job->stage = 'new';
$job->provider = 'bunq'; $job->provider = 'bunq';

View File

@@ -45,7 +45,7 @@ class FakeRoutineTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $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->status = 'ready_to_run';
$job->stage = 'ahoy'; $job->stage = 'ahoy';
$job->provider = 'fake'; $job->provider = 'fake';
@@ -81,7 +81,7 @@ class FakeRoutineTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $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->status = 'ready_to_run';
$job->stage = 'final'; $job->stage = 'final';
$job->provider = 'fake'; $job->provider = 'fake';
@@ -118,7 +118,7 @@ class FakeRoutineTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $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->status = 'ready_to_run';
$job->stage = 'new'; $job->stage = 'new';
$job->provider = 'fake'; $job->provider = 'fake';

View File

@@ -45,7 +45,7 @@ class FileRoutineTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $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->status = 'ready_to_run';
$job->stage = 'ready_to_run'; $job->stage = 'ready_to_run';
$job->provider = 'file'; $job->provider = 'file';

View File

@@ -46,7 +46,7 @@ class SpectreRoutineTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $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->status = 'ready_to_run';
$job->stage = 'do-authenticate'; $job->stage = 'do-authenticate';
$job->provider = 'spectre'; $job->provider = 'spectre';
@@ -77,7 +77,7 @@ class SpectreRoutineTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $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->status = 'ready_to_run';
$job->stage = 'authenticated'; $job->stage = 'authenticated';
$job->provider = 'spectre'; $job->provider = 'spectre';
@@ -115,7 +115,7 @@ class SpectreRoutineTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $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->status = 'ready_to_run';
$job->stage = 'go-for-import'; $job->stage = 'go-for-import';
$job->provider = 'spectre'; $job->provider = 'spectre';
@@ -154,7 +154,7 @@ class SpectreRoutineTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $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->status = 'ready_to_run';
$job->stage = 'new'; $job->stage = 'new';
$job->provider = 'spectre'; $job->provider = 'spectre';
@@ -194,7 +194,7 @@ class SpectreRoutineTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $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->status = 'ready_to_run';
$job->stage = 'new'; $job->stage = 'new';
$job->provider = 'spectre'; $job->provider = 'spectre';

View File

@@ -58,7 +58,7 @@ class ImportArrayStorageTest extends TestCase
// make fake job // make fake job
$job = new ImportJob; $job = new ImportJob;
$job->user()->associate($this->user()); $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->status = 'new';
$job->stage = 'new'; $job->stage = 'new';
$job->provider = 'fake'; $job->provider = 'fake';
@@ -99,7 +99,7 @@ class ImportArrayStorageTest extends TestCase
// make fake job // make fake job
$job = new ImportJob; $job = new ImportJob;
$job->user()->associate($this->user()); $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->status = 'new';
$job->stage = 'new'; $job->stage = 'new';
$job->provider = 'fake'; $job->provider = 'fake';
@@ -171,7 +171,7 @@ class ImportArrayStorageTest extends TestCase
$transactions = [$this->singleWithdrawal(), $this->singleWithdrawal()]; $transactions = [$this->singleWithdrawal(), $this->singleWithdrawal()];
$job = new ImportJob; $job = new ImportJob;
$job->user()->associate($this->user()); $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->status = 'new';
$job->stage = 'new'; $job->stage = 'new';
$job->provider = 'fake'; $job->provider = 'fake';
@@ -232,7 +232,7 @@ class ImportArrayStorageTest extends TestCase
// make fake job // make fake job
$job = new ImportJob; $job = new ImportJob;
$job->user()->associate($this->user()); $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->status = 'new';
$job->stage = 'new'; $job->stage = 'new';
$job->provider = 'fake'; $job->provider = 'fake';
@@ -271,7 +271,7 @@ class ImportArrayStorageTest extends TestCase
// make fake job // make fake job
$job = new ImportJob; $job = new ImportJob;
$job->user()->associate($this->user()); $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->status = 'new';
$job->stage = 'new'; $job->stage = 'new';
$job->provider = 'fake'; $job->provider = 'fake';
@@ -313,7 +313,7 @@ class ImportArrayStorageTest extends TestCase
// make fake job // make fake job
$job = new ImportJob; $job = new ImportJob;
$job->user()->associate($this->user()); $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->status = 'new';
$job->stage = 'new'; $job->stage = 'new';
$job->provider = 'fake'; $job->provider = 'fake';
@@ -364,7 +364,7 @@ class ImportArrayStorageTest extends TestCase
// make fake job // make fake job
$job = new ImportJob; $job = new ImportJob;
$job->user()->associate($this->user()); $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->status = 'new';
$job->stage = 'new'; $job->stage = 'new';
$job->provider = 'fake'; $job->provider = 'fake';
@@ -419,7 +419,7 @@ class ImportArrayStorageTest extends TestCase
// make fake job // make fake job
$job = new ImportJob; $job = new ImportJob;
$job->user()->associate($this->user()); $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->status = 'new';
$job->stage = 'new'; $job->stage = 'new';
$job->provider = 'fake'; $job->provider = 'fake';

View File

@@ -40,7 +40,7 @@ class AccountDestroyServiceTest extends TestCase
public function testDestroyBasic(): void public function testDestroyBasic(): void
{ {
$account = Account::create( $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] 'virtual_balance' => '0', 'iban' => null, 'active' => true]
); );
/** @var AccountDestroyService $service */ /** @var AccountDestroyService $service */
@@ -57,7 +57,7 @@ class AccountDestroyServiceTest extends TestCase
{ {
// create objects: // create objects:
$account = Account::create( $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] 'virtual_balance' => '0', 'iban' => null, 'active' => true]
); );
Transaction::create(['account_id' => $account->id, 'transaction_journal_id' => 1, 'amount' => 10, 'transaction_currency_id' => 1]); 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 public function testDestroyMove(): void
{ {
$account = Account::create( $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] 'virtual_balance' => '0', 'iban' => null, 'active' => true]
); );
$move = Account::create( $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] 'virtual_balance' => '0', 'iban' => null, 'active' => true]
); );
$transaction = Transaction::create(['account_id' => $account->id, 'transaction_journal_id' => 1, 'amount' => 10, 'transaction_currency_id' => 1]); $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 */ /** @var Account $account */
$account = Account::create( $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] 'virtual_balance' => '0', 'iban' => null, 'active' => true]
); );
$opposing = $this->user()->accounts()->first(); $opposing = $this->user()->accounts()->first();
@@ -67,7 +67,7 @@ class AccountUpdateServiceTest extends TestCase
$data = [ $data = [
'name' => 'Some new name #' . random_int(1, 1000), 'name' => 'Some new name #' . random_int(1, 10000),
'active' => true, 'active' => true,
'virtualBalance' => '0', 'virtualBalance' => '0',
'iban' => null, 'iban' => null,
@@ -96,7 +96,7 @@ class AccountUpdateServiceTest extends TestCase
/** @var Account $account */ /** @var Account $account */
$account = $this->user()->accounts()->first(); $account = $this->user()->accounts()->first();
$data = [ $data = [
'name' => 'Some new name #' . random_int(1, 1000), 'name' => 'Some new name #' . random_int(1, 10000),
'active' => true, 'active' => true,
'virtualBalance' => '0', 'virtualBalance' => '0',
'iban' => null, 'iban' => null,
@@ -119,7 +119,7 @@ class AccountUpdateServiceTest extends TestCase
/** @var Account $account */ /** @var Account $account */
$account = $this->user()->accounts()->first(); $account = $this->user()->accounts()->first();
$data = [ $data = [
'name' => 'Some new name #' . random_int(1, 1000), 'name' => 'Some new name #' . random_int(1, 10000),
'active' => true, 'active' => true,
'virtualBalance' => '0', 'virtualBalance' => '0',
'iban' => null, 'iban' => null,
@@ -149,7 +149,7 @@ class AccountUpdateServiceTest extends TestCase
$note->save(); $note->save();
$data = [ $data = [
'name' => 'Some new name #' . random_int(1, 1000), 'name' => 'Some new name #' . random_int(1, 10000),
'active' => true, 'active' => true,
'virtualBalance' => '0', 'virtualBalance' => '0',
'iban' => null, 'iban' => null,
@@ -174,7 +174,7 @@ class AccountUpdateServiceTest extends TestCase
{ {
/** @var Account $account */ /** @var Account $account */
$account = Account::create( $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] 'virtual_balance' => '0', 'iban' => null, 'active' => true]
); );
$opposing = $this->user()->accounts()->first(); $opposing = $this->user()->accounts()->first();
@@ -195,7 +195,7 @@ class AccountUpdateServiceTest extends TestCase
$data = [ $data = [
'name' => 'Some new name #' . random_int(1, 1000), 'name' => 'Some new name #' . random_int(1, 10000),
'active' => true, 'active' => true,
'virtualBalance' => '0', 'virtualBalance' => '0',
'iban' => null, 'iban' => null,
@@ -229,7 +229,7 @@ class AccountUpdateServiceTest extends TestCase
/** @var Account $account */ /** @var Account $account */
$account = Account::create( $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] 'virtual_balance' => '0', 'iban' => null, 'active' => true]
); );
$opposing = $this->user()->accounts()->first(); $opposing = $this->user()->accounts()->first();
@@ -250,7 +250,7 @@ class AccountUpdateServiceTest extends TestCase
$data = [ $data = [
'name' => 'Some new name #' . random_int(1, 1000), 'name' => 'Some new name #' . random_int(1, 10000),
'active' => true, 'active' => true,
'virtualBalance' => '0', 'virtualBalance' => '0',
'iban' => null, 'iban' => null,
@@ -281,11 +281,11 @@ class AccountUpdateServiceTest extends TestCase
{ {
/** @var Account $account */ /** @var Account $account */
$account = Account::create( $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] 'virtual_balance' => '0', 'iban' => null, 'active' => true]
); );
$data = [ $data = [
'name' => 'Some new name #' . random_int(1, 1000), 'name' => 'Some new name #' . random_int(1, 10000),
'active' => true, 'active' => true,
'virtualBalance' => '0', 'virtualBalance' => '0',
'iban' => null, 'iban' => null,

View File

@@ -65,7 +65,7 @@ class JournalUpdateServiceTest extends TestCase
/** @var TransactionJournal $journal */ /** @var TransactionJournal $journal */
$journal = $this->user()->transactionJournals()->where('transaction_type_id', 2)->first(); $journal = $this->user()->transactionJournals()->where('transaction_type_id', 2)->first();
$data = [ $data = [
'description' => 'Updated journal #' . random_int(1, 1000), 'description' => 'Updated journal #' . random_int(1, 10000),
'date' => new Carbon('2018-01-01'), 'date' => new Carbon('2018-01-01'),
'bill_id' => null, 'bill_id' => null,
'bill_name' => null, 'bill_name' => null,
@@ -107,7 +107,7 @@ class JournalUpdateServiceTest extends TestCase
/** @var TransactionJournal $journal */ /** @var TransactionJournal $journal */
$journal = $this->user()->transactionJournals()->inRandomOrder()->where('transaction_type_id', 2)->first(); $journal = $this->user()->transactionJournals()->inRandomOrder()->where('transaction_type_id', 2)->first();
$data = [ $data = [
'description' => 'Updated journal #' . random_int(1, 1000), 'description' => 'Updated journal #' . random_int(1, 10000),
'date' => new Carbon('2018-01-01'), 'date' => new Carbon('2018-01-01'),
'bill_id' => null, 'bill_id' => null,
'bill_name' => null, 'bill_name' => null,
@@ -199,7 +199,7 @@ class JournalUpdateServiceTest extends TestCase
/** @var TransactionJournal $journal */ /** @var TransactionJournal $journal */
$journal = $this->user()->transactionJournals()->skip(4)->where('transaction_type_id', 1)->first(); $journal = $this->user()->transactionJournals()->skip(4)->where('transaction_type_id', 1)->first();
$data = [ $data = [
'description' => 'Updated journal #' . random_int(1, 1000), 'description' => 'Updated journal #' . random_int(1, 10000),
'date' => new Carbon('2018-01-01'), 'date' => new Carbon('2018-01-01'),
'bill_id' => null, 'bill_id' => null,
'bill_name' => null, 'bill_name' => null,

View File

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

View File

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

View File

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

View File

@@ -117,7 +117,7 @@ class ConfigureRolesHandlerTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $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->status = 'new';
$job->stage = 'new'; $job->stage = 'new';
$job->provider = 'fake'; $job->provider = 'fake';
@@ -193,7 +193,7 @@ class ConfigureRolesHandlerTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $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->status = 'new';
$job->stage = 'new'; $job->stage = 'new';
$job->provider = 'fake'; $job->provider = 'fake';
@@ -270,7 +270,7 @@ class ConfigureRolesHandlerTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $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->status = 'new';
$job->stage = 'new'; $job->stage = 'new';
$job->provider = 'fake'; $job->provider = 'fake';
@@ -340,7 +340,7 @@ class ConfigureRolesHandlerTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $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->status = 'new';
$job->stage = 'new'; $job->stage = 'new';
$job->provider = 'fake'; $job->provider = 'fake';
@@ -504,7 +504,7 @@ class ConfigureRolesHandlerTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $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->status = 'new';
$job->stage = 'new'; $job->stage = 'new';
$job->provider = 'fake'; $job->provider = 'fake';

View File

@@ -43,7 +43,7 @@ class ConfigureUploadHandlerTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $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->status = 'new';
$job->stage = 'new'; $job->stage = 'new';
$job->provider = 'fake'; $job->provider = 'fake';
@@ -92,7 +92,7 @@ class ConfigureUploadHandlerTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $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->status = 'new';
$job->stage = 'new'; $job->stage = 'new';
$job->provider = 'fake'; $job->provider = 'fake';
@@ -140,7 +140,7 @@ class ConfigureUploadHandlerTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $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->status = 'new';
$job->stage = 'new'; $job->stage = 'new';
$job->provider = 'fake'; $job->provider = 'fake';

View File

@@ -46,7 +46,7 @@ class NewFileJobHandlerTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $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->status = 'new';
$job->stage = 'new'; $job->stage = 'new';
$job->provider = 'fake'; $job->provider = 'fake';
@@ -101,7 +101,7 @@ class NewFileJobHandlerTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $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->status = 'new';
$job->stage = 'new'; $job->stage = 'new';
$job->provider = 'fake'; $job->provider = 'fake';
@@ -159,7 +159,7 @@ class NewFileJobHandlerTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $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->status = 'new';
$job->stage = 'new'; $job->stage = 'new';
$job->provider = 'fake'; $job->provider = 'fake';
@@ -206,7 +206,7 @@ class NewFileJobHandlerTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $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->status = 'new';
$job->stage = 'new'; $job->stage = 'new';
$job->provider = 'fake'; $job->provider = 'fake';
@@ -254,7 +254,7 @@ class NewFileJobHandlerTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $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->status = 'new';
$job->stage = 'new'; $job->stage = 'new';
$job->provider = 'fake'; $job->provider = 'fake';

View File

@@ -54,7 +54,7 @@ class ChooseAccountsHandlerTest extends TestCase
// fake job: // fake job:
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $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->status = 'new';
$job->stage = 'new'; $job->stage = 'new';
$job->provider = 'spectre'; $job->provider = 'spectre';
@@ -89,7 +89,7 @@ class ChooseAccountsHandlerTest extends TestCase
// fake job: // fake job:
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $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->status = 'new';
$job->stage = 'new'; $job->stage = 'new';
$job->provider = 'spectre'; $job->provider = 'spectre';
@@ -128,7 +128,7 @@ class ChooseAccountsHandlerTest extends TestCase
// fake job: // fake job:
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $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->status = 'new';
$job->stage = 'new'; $job->stage = 'new';
$job->provider = 'spectre'; $job->provider = 'spectre';
@@ -187,7 +187,7 @@ class ChooseAccountsHandlerTest extends TestCase
// fake job: // fake job:
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $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->status = 'new';
$job->stage = 'new'; $job->stage = 'new';
$job->provider = 'spectre'; $job->provider = 'spectre';
@@ -246,7 +246,7 @@ class ChooseAccountsHandlerTest extends TestCase
// fake job: // fake job:
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $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->status = 'new';
$job->stage = 'new'; $job->stage = 'new';
$job->provider = 'spectre'; $job->provider = 'spectre';
@@ -303,7 +303,7 @@ class ChooseAccountsHandlerTest extends TestCase
// fake job: // fake job:
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $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->status = 'new';
$job->stage = 'new'; $job->stage = 'new';
$job->provider = 'spectre'; $job->provider = 'spectre';
@@ -433,7 +433,7 @@ class ChooseAccountsHandlerTest extends TestCase
// fake job: // fake job:
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $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->status = 'new';
$job->stage = 'new'; $job->stage = 'new';
$job->provider = 'spectre'; $job->provider = 'spectre';
@@ -586,7 +586,7 @@ class ChooseAccountsHandlerTest extends TestCase
// fake job: // fake job:
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $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->status = 'new';
$job->stage = 'new'; $job->stage = 'new';
$job->provider = 'spectre'; $job->provider = 'spectre';

View File

@@ -51,7 +51,7 @@ class ChooseLoginHandlerTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $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->status = 'new';
$job->stage = 'new'; $job->stage = 'new';
$job->provider = 'spectre'; $job->provider = 'spectre';
@@ -74,7 +74,7 @@ class ChooseLoginHandlerTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $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->status = 'new';
$job->stage = 'new'; $job->stage = 'new';
$job->provider = 'spectre'; $job->provider = 'spectre';
@@ -98,7 +98,7 @@ class ChooseLoginHandlerTest extends TestCase
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $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->status = 'new';
$job->stage = 'new'; $job->stage = 'new';
$job->provider = 'spectre'; $job->provider = 'spectre';
@@ -138,7 +138,7 @@ class ChooseLoginHandlerTest extends TestCase
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $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->status = 'new';
$job->stage = 'new'; $job->stage = 'new';
$job->provider = 'spectre'; $job->provider = 'spectre';
@@ -256,7 +256,7 @@ class ChooseLoginHandlerTest extends TestCase
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $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->status = 'new';
$job->stage = 'new'; $job->stage = 'new';
$job->provider = 'spectre'; $job->provider = 'spectre';

View File

@@ -51,7 +51,7 @@ class DoAuthenticateHandlerTest extends TestCase
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $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->status = 'new';
$job->stage = 'new'; $job->stage = 'new';
$job->provider = 'spectre'; $job->provider = 'spectre';

View File

@@ -57,7 +57,7 @@ class StageImportDataHandlerTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $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->status = 'new';
$job->stage = 'new'; $job->stage = 'new';
$job->provider = 'bunq'; $job->provider = 'bunq';
@@ -107,7 +107,7 @@ class StageImportDataHandlerTest extends TestCase
$payment = new BunqPayment($amount, $pointer, 'Some descr', null, null); $payment = new BunqPayment($amount, $pointer, 'Some descr', null, null);
$payment->setAmount($amount); $payment->setAmount($amount);
$payment->setCounterpartyAlias($labelMonetaryAccount); $payment->setCounterpartyAlias($labelMonetaryAccount);
$payment->setDescription('Random description #' . random_int(1, 1000)); $payment->setDescription('Random description #' . random_int(1, 10000));
$value = [$payment]; $value = [$payment];
$list = new BunqResponsePaymentList($value, [], null); $list = new BunqResponsePaymentList($value, [], null);
@@ -191,7 +191,7 @@ class StageImportDataHandlerTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $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->status = 'new';
$job->stage = 'new'; $job->stage = 'new';
$job->provider = 'bunq'; $job->provider = 'bunq';
@@ -253,7 +253,7 @@ class StageImportDataHandlerTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $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->status = 'new';
$job->stage = 'new'; $job->stage = 'new';
$job->provider = 'bunq'; $job->provider = 'bunq';
@@ -295,7 +295,7 @@ class StageImportDataHandlerTest extends TestCase
$payment = new BunqPayment($amount, $pointer, 'Some descr', null, null); $payment = new BunqPayment($amount, $pointer, 'Some descr', null, null);
$payment->setAmount($amount); $payment->setAmount($amount);
$payment->setDescription('Some random thing #' . random_int(1, 1000)); $payment->setDescription('Some random thing #' . random_int(1, 10000));
$payment->setCounterpartyAlias($labelMonetaryAccount); $payment->setCounterpartyAlias($labelMonetaryAccount);
$value = [$payment]; $value = [$payment];
$list = new BunqResponsePaymentList($value, [], null); $list = new BunqResponsePaymentList($value, [], null);
@@ -377,7 +377,7 @@ class StageImportDataHandlerTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $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->status = 'new';
$job->stage = 'new'; $job->stage = 'new';
$job->provider = 'bunq'; $job->provider = 'bunq';
@@ -427,7 +427,7 @@ class StageImportDataHandlerTest extends TestCase
$payment = new BunqPayment($amount, $pointer, 'Some descr', null, null); $payment = new BunqPayment($amount, $pointer, 'Some descr', null, null);
$payment->setAmount($amount); $payment->setAmount($amount);
$payment->setCounterpartyAlias($labelMonetaryAccount); $payment->setCounterpartyAlias($labelMonetaryAccount);
$payment->setDescription('Random transfer #' . random_int(1, 1000)); $payment->setDescription('Random transfer #' . random_int(1, 10000));
$value = [$payment]; $value = [$payment];
$list = new BunqResponsePaymentList($value, [], null); $list = new BunqResponsePaymentList($value, [], null);

View File

@@ -57,7 +57,7 @@ class StageNewHandlerTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $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->status = 'new';
$job->stage = 'new'; $job->stage = 'new';
$job->provider = 'bunq'; $job->provider = 'bunq';
@@ -143,7 +143,7 @@ class StageNewHandlerTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $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->status = 'new';
$job->stage = 'new'; $job->stage = 'new';
$job->provider = 'bunq'; $job->provider = 'bunq';
@@ -234,7 +234,7 @@ class StageNewHandlerTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $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->status = 'new';
$job->stage = 'new'; $job->stage = 'new';
$job->provider = 'bunq'; $job->provider = 'bunq';

View File

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

View File

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

View File

@@ -112,7 +112,7 @@ class StageAuthenticatedHandlerTest extends TestCase
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $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->status = 'new';
$job->stage = 'new'; $job->stage = 'new';
$job->provider = 'spectre'; $job->provider = 'spectre';
@@ -241,7 +241,7 @@ class StageAuthenticatedHandlerTest extends TestCase
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $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->status = 'new';
$job->stage = 'new'; $job->stage = 'new';
$job->provider = 'spectre'; $job->provider = 'spectre';
@@ -370,7 +370,7 @@ class StageAuthenticatedHandlerTest extends TestCase
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $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->status = 'new';
$job->stage = 'new'; $job->stage = 'new';
$job->provider = 'spectre'; $job->provider = 'spectre';

View File

@@ -113,7 +113,7 @@ class StageImportDataHandlerTest extends TestCase
$revenue = $this->user()->accounts()->where('account_type_id', 5)->first(); $revenue = $this->user()->accounts()->where('account_type_id', 5)->first();
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $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->status = 'new';
$job->stage = 'new'; $job->stage = 'new';
$job->provider = 'spectre'; $job->provider = 'spectre';
@@ -313,7 +313,7 @@ class StageImportDataHandlerTest extends TestCase
$revenue = $this->user()->accounts()->where('account_type_id', 5)->first(); $revenue = $this->user()->accounts()->where('account_type_id', 5)->first();
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $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->status = 'new';
$job->stage = 'new'; $job->stage = 'new';
$job->provider = 'spectre'; $job->provider = 'spectre';
@@ -510,7 +510,7 @@ class StageImportDataHandlerTest extends TestCase
$revenue = $this->user()->accounts()->where('account_type_id', 5)->first(); $revenue = $this->user()->accounts()->where('account_type_id', 5)->first();
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $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->status = 'new';
$job->stage = 'new'; $job->stage = 'new';
$job->provider = 'spectre'; $job->provider = 'spectre';

View File

@@ -59,7 +59,7 @@ class StageNewHandlerTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $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->status = 'new';
$job->stage = 'new'; $job->stage = 'new';
$job->provider = 'spectre'; $job->provider = 'spectre';
@@ -126,7 +126,7 @@ class StageNewHandlerTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $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->status = 'new';
$job->stage = 'new'; $job->stage = 'new';
$job->provider = 'spectre'; $job->provider = 'spectre';
@@ -179,7 +179,7 @@ class StageNewHandlerTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $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->status = 'new';
$job->stage = 'new'; $job->stage = 'new';
$job->provider = 'spectre'; $job->provider = 'spectre';
@@ -248,7 +248,7 @@ class StageNewHandlerTest extends TestCase
{ {
$job = new ImportJob; $job = new ImportJob;
$job->user_id = $this->user()->id; $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->status = 'new';
$job->stage = 'new'; $job->stage = 'new';
$job->provider = 'spectre'; $job->provider = 'spectre';

View File

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

View File

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

View File

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

View File

@@ -103,7 +103,7 @@ class SetDestinationAccountTest extends TestCase
// fire the action: // fire the action:
$ruleAction = new RuleAction; $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); $action = new SetDestinationAccount($ruleAction);
$result = $action->act($journal); $result = $action->act($journal);
$this->assertFalse($result); $this->assertFalse($result);
@@ -134,7 +134,7 @@ class SetDestinationAccountTest extends TestCase
// fire the action: // fire the action:
$ruleAction = new RuleAction; $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); $action = new SetDestinationAccount($ruleAction);
$result = $action->act($journal); $result = $action->act($journal);
@@ -202,7 +202,7 @@ class SetDestinationAccountTest extends TestCase
// fire the action: // fire the action:
$ruleAction = new RuleAction; $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); $action = new SetDestinationAccount($ruleAction);
$result = $action->act($journal); $result = $action->act($journal);
$this->assertFalse($result); $this->assertFalse($result);

View File

@@ -104,7 +104,7 @@ class SetSourceAccountTest extends TestCase
// fire the action: // fire the action:
$ruleAction = new RuleAction; $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); $action = new SetSourceAccount($ruleAction);
$result = $action->act($journal); $result = $action->act($journal);
$this->assertTrue($result); $this->assertTrue($result);
@@ -173,7 +173,7 @@ class SetSourceAccountTest extends TestCase
// fire the action: // fire the action:
$ruleAction = new RuleAction; $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); $action = new SetSourceAccount($ruleAction);
$result = $action->act($journal); $result = $action->act($journal);
$this->assertFalse($result); $this->assertFalse($result);
@@ -196,7 +196,7 @@ class SetSourceAccountTest extends TestCase
$accountRepos->shouldReceive('setUser'); $accountRepos->shouldReceive('setUser');
// fire the action: // fire the action:
$ruleAction = new RuleAction; $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); $action = new SetSourceAccount($ruleAction);
$result = $action->act($journal); $result = $action->act($journal);
$this->assertFalse($result); $this->assertFalse($result);

View File

@@ -142,7 +142,7 @@ class AccountTransformerTest extends TestCase
'noteable_id' => $account->id, 'noteable_id' => $account->id,
'noteable_type' => Account::class, 'noteable_type' => Account::class,
'title' => null, '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_id' => $account->id,
'noteable_type' => Account::class, 'noteable_type' => Account::class,
'title' => null, '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_id' => $account->id,
'noteable_type' => Account::class, 'noteable_type' => Account::class,
'title' => null, '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( $tag = Tag::create(
[ [
'user_id' => $this->user()->id, 'user_id' => $this->user()->id,
'tag' => 'Some tag ' . random_int(1, 1000), 'tag' => 'Some tag ' . random_int(1, 10000),
'tagMode' => 'nothing', 'tagMode' => 'nothing',
'date' => '2018-01-01', 'date' => '2018-01-01',
'description' => 'Some tag', 'description' => 'Some tag',

View File

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