diff --git a/tests/Api/V1/Controllers/AttachmentControllerTest.php b/tests/Api/V1/Controllers/AttachmentControllerTest.php index 8096733f6a..e39620347f 100644 --- a/tests/Api/V1/Controllers/AttachmentControllerTest.php +++ b/tests/Api/V1/Controllers/AttachmentControllerTest.php @@ -138,7 +138,7 @@ class AttachmentControllerTest extends TestCase 'user_id' => $this->user()->id, 'attachable_id' => 1, 'attachable_type' => TransactionJournal::class, - 'md5' => md5('Hello' . random_int(1, 1000)), + 'md5' => md5('Hello' . random_int(1, 10000)), 'filename' => 'some name', 'mime' => 'text/plain', 'size' => 5, @@ -230,7 +230,7 @@ class AttachmentControllerTest extends TestCase // data to submit $data = [ 'filename' => 'Some new att', - 'description' => sprintf('Attempt #%d', random_int(1, 1000)), + 'description' => sprintf('Attempt #%d', random_int(1, 10000)), 'model' => TransactionJournal::class, 'model_id' => 1, ]; @@ -265,7 +265,7 @@ class AttachmentControllerTest extends TestCase // data to submit $data = [ 'filename' => $attachment->filename, - 'description' => sprintf('Attempt #%d', random_int(1, 1000)), + 'description' => sprintf('Attempt #%d', random_int(1, 10000)), 'model' => TransactionJournal::class, 'model_id' => 1, ]; diff --git a/tests/Api/V1/Controllers/BillControllerTest.php b/tests/Api/V1/Controllers/BillControllerTest.php index 970b4e8d4f..8621d3779b 100644 --- a/tests/Api/V1/Controllers/BillControllerTest.php +++ b/tests/Api/V1/Controllers/BillControllerTest.php @@ -142,8 +142,8 @@ class BillControllerTest extends TestCase // data to submit: $data = [ - 'name' => 'New bill #' . random_int(1, 1000), - 'match' => 'some,words,' . random_int(1, 1000), + 'name' => 'New bill #' . random_int(1, 10000), + 'match' => 'some,words,' . random_int(1, 10000), 'amount_min' => '66.34', 'amount_max' => '45.67', 'date' => '2018-01-01', @@ -187,8 +187,8 @@ class BillControllerTest extends TestCase $repository->shouldReceive('getRulesForBill')->withAnyArgs()->andReturn(new Collection()); // data to submit: $data = [ - 'name' => 'New bill #' . random_int(1, 1000), - 'match' => 'some,words,' . random_int(1, 1000), + 'name' => 'New bill #' . random_int(1, 10000), + 'match' => 'some,words,' . random_int(1, 10000), 'amount_min' => '12.34', 'amount_max' => '45.67', 'date' => '2018-01-01', @@ -226,8 +226,8 @@ class BillControllerTest extends TestCase $repository->shouldReceive('getRulesForBill')->withAnyArgs()->andReturn(new Collection()); // data to submit: $data = [ - 'name' => 'New bill #' . random_int(1, 1000), - 'match' => 'some,words,' . random_int(1, 1000), + 'name' => 'New bill #' . random_int(1, 10000), + 'match' => 'some,words,' . random_int(1, 10000), 'amount_min' => '12.34', 'amount_max' => '45.67', 'date' => '2018-01-01', diff --git a/tests/Api/V1/Controllers/TransactionControllerTest.php b/tests/Api/V1/Controllers/TransactionControllerTest.php index 2a06e0f402..738c5be471 100644 --- a/tests/Api/V1/Controllers/TransactionControllerTest.php +++ b/tests/Api/V1/Controllers/TransactionControllerTest.php @@ -96,7 +96,7 @@ class TransactionControllerTest extends TestCase $data = [ - 'description' => 'Some transaction #' . random_int(1, 1000), + 'description' => 'Some transaction #' . random_int(1, 10000), 'date' => '2018-01-01', 'type' => 'withdrawal', 'transactions' => [ @@ -142,7 +142,7 @@ class TransactionControllerTest extends TestCase $accountRepos->shouldReceive('getAccountsById')->andReturn(new Collection([$account])); $data = [ - 'description' => 'Some transaction #' . random_int(1, 1000), + 'description' => 'Some transaction #' . random_int(1, 10000), 'date' => '2018-01-01', 'type' => 'withdrawal', 'transactions' => [ @@ -240,7 +240,7 @@ class TransactionControllerTest extends TestCase $accountRepos->shouldReceive('getAccountsById')->andReturn(new Collection([$account])); $data = [ - 'description' => 'Split journal #' . random_int(1, 1000), + 'description' => 'Split journal #' . random_int(1, 10000), 'date' => '2018-01-01', 'type' => 'withdrawal', 'transactions' => [ @@ -298,7 +298,7 @@ class TransactionControllerTest extends TestCase $accountRepos->shouldReceive('getAccountsById')->andReturn(new Collection([$account])); $data = [ - 'description' => 'Some transaction #' . random_int(1, 1000), + 'description' => 'Some transaction #' . random_int(1, 10000), 'date' => '2018-01-01', 'type' => 'withdrawal', 'transactions' => [ @@ -345,7 +345,7 @@ class TransactionControllerTest extends TestCase $accountRepos->shouldReceive('findByName')->andReturn(null); $data = [ - 'description' => 'Some transaction #' . random_int(1, 1000), + 'description' => 'Some transaction #' . random_int(1, 10000), 'date' => '2018-01-01', 'type' => 'withdrawal', 'transactions' => [ @@ -390,7 +390,7 @@ class TransactionControllerTest extends TestCase $accountRepos->shouldReceive('setUser'); $data = [ - 'description' => 'Some transaction #' . random_int(1, 1000), + 'description' => 'Some transaction #' . random_int(1, 10000), 'date' => '2018-01-01', 'type' => 'withdrawal', 'transactions' => [ @@ -434,7 +434,7 @@ class TransactionControllerTest extends TestCase $accountRepos->shouldReceive('setUser'); $data = [ - 'description' => 'Some transaction #' . random_int(1, 1000), + 'description' => 'Some transaction #' . random_int(1, 10000), 'date' => '2018-01-01', 'type' => 'withdrawal', 'transactions' => [], @@ -474,7 +474,7 @@ class TransactionControllerTest extends TestCase $data = [ - 'description' => 'Split journal #' . random_int(1, 1000), + 'description' => 'Split journal #' . random_int(1, 10000), 'date' => '2018-01-01', 'type' => 'withdrawal', 'transactions' => [ @@ -524,7 +524,7 @@ class TransactionControllerTest extends TestCase $data = [ - 'description' => 'Some transaction #' . random_int(1, 1000), + 'description' => 'Some transaction #' . random_int(1, 10000), 'date' => '2018-01-01', 'type' => 'withdrawal', 'transactions' => [ @@ -580,7 +580,7 @@ class TransactionControllerTest extends TestCase // submit with another account. $data = [ - 'description' => 'Some transaction #' . random_int(1, 1000), + 'description' => 'Some transaction #' . random_int(1, 10000), 'date' => '2018-01-01', 'type' => 'withdrawal', 'bill_id' => $bill->id, @@ -638,7 +638,7 @@ class TransactionControllerTest extends TestCase // submit with another account. $data = [ - 'description' => 'Some transaction #' . random_int(1, 1000), + 'description' => 'Some transaction #' . random_int(1, 10000), 'date' => '2018-01-01', 'type' => 'withdrawal', 'bill_name' => $bill->name, @@ -696,7 +696,7 @@ class TransactionControllerTest extends TestCase // submit with another account. $data = [ - 'description' => 'Some transaction #' . random_int(1, 1000), + 'description' => 'Some transaction #' . random_int(1, 10000), 'date' => '2018-01-01', 'type' => 'withdrawal', 'transactions' => [ @@ -754,7 +754,7 @@ class TransactionControllerTest extends TestCase // submit with another account. $data = [ - 'description' => 'Some transaction #' . random_int(1, 1000), + 'description' => 'Some transaction #' . random_int(1, 10000), 'date' => '2018-01-01', 'type' => 'withdrawal', 'transactions' => [ @@ -812,7 +812,7 @@ class TransactionControllerTest extends TestCase // submit with another account. $data = [ - 'description' => 'Some transaction #' . random_int(1, 1000), + 'description' => 'Some transaction #' . random_int(1, 10000), 'date' => '2018-01-01', 'type' => 'withdrawal', 'transactions' => [ @@ -876,7 +876,7 @@ class TransactionControllerTest extends TestCase // submit with another account. $data = [ - 'description' => 'Some transaction #' . random_int(1, 1000), + 'description' => 'Some transaction #' . random_int(1, 10000), 'date' => '2018-01-01', 'type' => 'withdrawal', 'piggy_bank_id' => $piggyBank->id, @@ -942,7 +942,7 @@ class TransactionControllerTest extends TestCase // submit with another account. $data = [ - 'description' => 'Some transaction #' . random_int(1, 1000), + 'description' => 'Some transaction #' . random_int(1, 10000), 'date' => '2018-01-01', 'type' => 'withdrawal', 'piggy_bank_name' => $piggyBank->name, @@ -996,7 +996,7 @@ class TransactionControllerTest extends TestCase $accountRepos->shouldReceive('getAccountsById')->andReturn(new Collection([$account])); $data = [ - 'description' => 'Some transaction #' . random_int(1, 1000), + 'description' => 'Some transaction #' . random_int(1, 10000), 'date' => '2018-01-01', 'type' => 'deposit', 'transactions' => [ @@ -1045,7 +1045,7 @@ class TransactionControllerTest extends TestCase $data = [ - 'description' => 'Some deposit #' . random_int(1, 1000), + 'description' => 'Some deposit #' . random_int(1, 10000), 'date' => '2018-01-01', 'type' => 'deposit', 'transactions' => [ @@ -1101,7 +1101,7 @@ class TransactionControllerTest extends TestCase $accountRepos->shouldReceive('getAccountsById')->andReturn(new Collection([$account]), new Collection([$second])); $data = [ - 'description' => 'Some transfer #' . random_int(1, 1000), + 'description' => 'Some transfer #' . random_int(1, 10000), 'date' => '2018-01-01', 'type' => 'transfer', 'transactions' => [ @@ -1165,7 +1165,7 @@ class TransactionControllerTest extends TestCase $accountRepos->shouldReceive('getAccountsById')->andReturn(new Collection([$account]), new Collection([$second])); $data = [ - 'description' => 'Some transaction #' . random_int(1, 1000), + 'description' => 'Some transaction #' . random_int(1, 10000), 'date' => '2018-01-01', 'type' => 'withdrawal', 'transactions' => [ @@ -1479,7 +1479,7 @@ class TransactionControllerTest extends TestCase $bill = $this->user()->bills()->first(); $data = [ - 'description' => 'Some transaction #' . random_int(1, 1000), + 'description' => 'Some transaction #' . random_int(1, 10000), 'date' => '2018-01-01', 'type' => 'withdrawal', 'bill_id' => $bill->id, @@ -1520,7 +1520,7 @@ class TransactionControllerTest extends TestCase $bill = $this->user()->bills()->first(); $data = [ - 'description' => 'Some transaction #' . random_int(1, 1000), + 'description' => 'Some transaction #' . random_int(1, 10000), 'date' => '2018-01-01', 'type' => 'withdrawal', 'bill_name' => $bill->name, @@ -1559,7 +1559,7 @@ class TransactionControllerTest extends TestCase $journalRepos->shouldReceive('store')->andReturn($journal)->once(); $data = [ - 'description' => 'Some transaction #' . random_int(1, 1000), + 'description' => 'Some transaction #' . random_int(1, 10000), 'date' => '2018-01-01', 'type' => 'withdrawal', 'transactions' => [ @@ -1567,7 +1567,7 @@ class TransactionControllerTest extends TestCase 'amount' => '10', 'currency_id' => 1, '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(); $data = [ - 'description' => 'Some transaction #' . random_int(1, 1000), + 'description' => 'Some transaction #' . random_int(1, 10000), 'date' => '2018-01-01', 'type' => 'withdrawal', 'transactions' => [ @@ -1639,7 +1639,7 @@ class TransactionControllerTest extends TestCase $journalRepos->shouldReceive('store')->andReturn($journal)->once(); $data = [ - 'description' => 'Some transaction #' . random_int(1, 1000), + 'description' => 'Some transaction #' . random_int(1, 10000), 'date' => '2018-01-01', 'type' => 'withdrawal', 'transactions' => [ @@ -1680,7 +1680,7 @@ class TransactionControllerTest extends TestCase $data = [ - 'description' => 'Some transaction #' . random_int(1, 1000), + 'description' => 'Some transaction #' . random_int(1, 10000), 'date' => '2018-01-01', 'type' => 'withdrawal', 'transactions' => [ @@ -1719,7 +1719,7 @@ class TransactionControllerTest extends TestCase $journalRepos->shouldReceive('store')->andReturn($journal)->once(); $data = [ - 'description' => 'Some transaction #' . random_int(1, 1000), + 'description' => 'Some transaction #' . random_int(1, 10000), 'date' => '2018-01-01', 'type' => 'deposit', 'transactions' => [ @@ -1757,7 +1757,7 @@ class TransactionControllerTest extends TestCase $accountRepos->shouldReceive('getAccountsById')->andReturn(new Collection([$account])); $journalRepos->shouldReceive('store')->andReturn($journal)->once(); $data = [ - 'description' => 'Some transaction #' . random_int(1, 1000), + 'description' => 'Some transaction #' . random_int(1, 10000), 'date' => '2018-01-01', 'type' => 'withdrawal', 'transactions' => [ @@ -1797,7 +1797,7 @@ class TransactionControllerTest extends TestCase $journalRepos->shouldReceive('store')->andReturn($journal)->once(); $data = [ - 'description' => 'Some transaction #' . random_int(1, 1000), + 'description' => 'Some transaction #' . random_int(1, 10000), 'date' => '2018-01-01', 'type' => 'withdrawal', 'transactions' => [ @@ -1836,7 +1836,7 @@ class TransactionControllerTest extends TestCase $accountRepos->shouldReceive('getAccountsById')->andReturn(new Collection([$account])); $journalRepos->shouldReceive('store')->andReturn($journal)->once(); $data = [ - 'description' => 'Some transaction #' . random_int(1, 1000), + 'description' => 'Some transaction #' . random_int(1, 10000), 'date' => '2018-01-01', 'type' => 'withdrawal', 'transactions' => [ @@ -1875,7 +1875,7 @@ class TransactionControllerTest extends TestCase $accountRepos->shouldReceive('getAccountsById')->andReturn(new Collection([$account])); $journalRepos->shouldReceive('store')->andReturn($journal)->once(); $data = [ - 'description' => 'Some transaction #' . random_int(1, 1000), + 'description' => 'Some transaction #' . random_int(1, 10000), 'date' => '2018-01-01', 'type' => 'withdrawal', 'transactions' => [ @@ -1915,7 +1915,7 @@ class TransactionControllerTest extends TestCase $accountRepos->shouldReceive('getAccountsById')->andReturn(new Collection([$account])); $journalRepos->shouldReceive('store')->andReturn($journal)->once(); $data = [ - 'description' => 'Some transaction #' . random_int(1, 1000), + 'description' => 'Some transaction #' . random_int(1, 10000), 'date' => '2018-01-01', 'type' => 'withdrawal', 'transactions' => [ @@ -1954,7 +1954,7 @@ class TransactionControllerTest extends TestCase $accountRepos->shouldReceive('getAccountsById')->andReturn(new Collection([$account])); $journalRepos->shouldReceive('store')->andReturn($journal)->once(); $data = [ - 'description' => 'Some transaction #' . random_int(1, 1000), + 'description' => 'Some transaction #' . random_int(1, 10000), 'date' => '2018-01-01', 'type' => 'withdrawal', // store date meta fields (if present): @@ -1999,9 +1999,9 @@ class TransactionControllerTest extends TestCase $accountRepos->shouldReceive('getAccountsById')->andReturn(new Collection([$account])); $journalRepos->shouldReceive('store')->andReturn($journal)->once(); - $name = 'Some new category #' . random_int(1, 1000); + $name = 'Some new category #' . random_int(1, 10000); $data = [ - 'description' => 'Some transaction #' . random_int(1, 1000), + 'description' => 'Some transaction #' . random_int(1, 10000), 'date' => '2018-01-01', 'type' => 'withdrawal', 'transactions' => [ @@ -2041,7 +2041,7 @@ class TransactionControllerTest extends TestCase $journalRepos->shouldReceive('store')->andReturn($journal)->once(); $name = 'New opposing account #' . random_int(1, 10000); $data = [ - 'description' => 'Some transaction #' . random_int(1, 1000), + 'description' => 'Some transaction #' . random_int(1, 10000), 'date' => '2018-01-01', 'type' => 'withdrawal', 'transactions' => [ @@ -2080,7 +2080,7 @@ class TransactionControllerTest extends TestCase $journalRepos->shouldReceive('store')->andReturn($journal)->once(); $data = [ - 'description' => 'Some transaction #' . random_int(1, 1000), + 'description' => 'Some transaction #' . random_int(1, 10000), 'date' => '2018-01-01', 'type' => 'withdrawal', 'notes' => 'I am a note', @@ -2119,7 +2119,7 @@ class TransactionControllerTest extends TestCase $accountRepos->shouldReceive('getAccountsById')->andReturn(new Collection([$account]), new Collection([$opposing])); $journalRepos->shouldReceive('store')->andReturn($journal)->once(); $data = [ - 'description' => 'Some transaction #' . random_int(1, 1000), + 'description' => 'Some transaction #' . random_int(1, 10000), 'date' => '2018-01-01', 'type' => 'withdrawal', 'transactions' => [ @@ -2159,7 +2159,7 @@ class TransactionControllerTest extends TestCase $journalRepos->shouldReceive('store')->andReturn($journal)->once(); $data = [ - 'description' => 'Some transaction #' . random_int(1, 1000), + 'description' => 'Some transaction #' . random_int(1, 10000), 'date' => '2018-01-01', 'type' => 'withdrawal', 'transactions' => [ @@ -2199,7 +2199,7 @@ class TransactionControllerTest extends TestCase $journalRepos->shouldReceive('store')->andReturn($journal)->once(); $piggy = $this->user()->piggyBanks()->first(); $data = [ - 'description' => 'Some deposit #' . random_int(1, 1000), + 'description' => 'Some deposit #' . random_int(1, 10000), 'date' => '2018-01-01', 'type' => 'deposit', 'piggy_bank_name' => $piggy->name, @@ -2240,7 +2240,7 @@ class TransactionControllerTest extends TestCase $piggy = $this->user()->piggyBanks()->first(); $data = [ - 'description' => 'Some transfer #' . random_int(1, 1000), + 'description' => 'Some transfer #' . random_int(1, 10000), 'date' => '2018-01-01', 'type' => 'transfer', 'piggy_bank_id' => $piggy->id, @@ -2280,7 +2280,7 @@ class TransactionControllerTest extends TestCase $piggy = $this->user()->piggyBanks()->first(); $data = [ - 'description' => 'Some transfer #' . random_int(1, 1000), + 'description' => 'Some transfer #' . random_int(1, 10000), 'date' => '2018-01-01', 'type' => 'transfer', 'piggy_bank_name' => $piggy->name, @@ -2316,7 +2316,7 @@ class TransactionControllerTest extends TestCase $accountRepos->shouldReceive('getAccountsById')->andReturn(new Collection([$account])); $journalRepos->shouldReceive('store')->andReturn($journal)->once(); $data = [ - 'description' => 'Some transaction #' . random_int(1, 1000), + 'description' => 'Some transaction #' . random_int(1, 10000), 'date' => '2018-01-01', 'type' => 'withdrawal', 'transactions' => [ @@ -2354,7 +2354,7 @@ class TransactionControllerTest extends TestCase $accountRepos->shouldReceive('getAccountsById')->andReturn(new Collection([$account])); $journalRepos->shouldReceive('store')->andReturn($journal)->once(); $data = [ - 'description' => 'Some transaction #' . random_int(1, 1000), + 'description' => 'Some transaction #' . random_int(1, 10000), 'date' => '2018-01-01', 'type' => 'withdrawal', 'transactions' => [ @@ -2392,9 +2392,9 @@ class TransactionControllerTest extends TestCase public function testSuccessStoreTags(): void { $tags = [ - 'TagOne' . random_int(1, 1000), - 'TagTwoBlarg' . random_int(1, 1000), - 'SomeThreeTag' . random_int(1, 1000), + 'TagOne' . random_int(1, 10000), + 'TagTwoBlarg' . random_int(1, 10000), + 'SomeThreeTag' . random_int(1, 10000), ]; $journal = $this->user()->transactionJournals()->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])); $journalRepos->shouldReceive('store')->andReturn($journal)->once(); $data = [ - 'description' => 'Some transaction #' . random_int(1, 1000), + 'description' => 'Some transaction #' . random_int(1, 10000), 'date' => '2018-01-01', 'type' => 'withdrawal', 'tags' => implode(',', $tags), @@ -2442,7 +2442,7 @@ class TransactionControllerTest extends TestCase $accountRepos->shouldReceive('getAccountsById')->withArgs([[$account->id]])->andReturn(new Collection([$account])); $data = [ - 'description' => 'Some deposit #' . random_int(1, 1000), + 'description' => 'Some deposit #' . random_int(1, 10000), 'date' => '2018-01-01', 'transactions' => [ [ @@ -2484,7 +2484,7 @@ class TransactionControllerTest extends TestCase $accountRepos->shouldReceive('getAccountsById')->withArgs([[$account->id]])->andReturn(new Collection([$account])); $data = [ - 'description' => 'Some transaction #' . random_int(1, 1000), + 'description' => 'Some transaction #' . random_int(1, 10000), 'date' => '2018-01-01', 'transactions' => [ [ diff --git a/tests/Api/V1/Controllers/UserControllerTest.php b/tests/Api/V1/Controllers/UserControllerTest.php index 457b1e0e4c..a54d8db930 100644 --- a/tests/Api/V1/Controllers/UserControllerTest.php +++ b/tests/Api/V1/Controllers/UserControllerTest.php @@ -57,7 +57,7 @@ class UserControllerTest extends TestCase public function testDelete(): void { // 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 $response = $this->delete('/api/v1/users/' . $user->id); @@ -76,7 +76,7 @@ class UserControllerTest extends TestCase Passport::actingAs($this->emptyUser()); // 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 $response = $this->delete('/api/v1/users/' . $user->id); @@ -137,7 +137,7 @@ class UserControllerTest extends TestCase public function testStoreBasic(): void { $data = [ - 'email' => 'some_new@user' . random_int(1, 1000) . '.com', + 'email' => 'some_new@user' . random_int(1, 10000) . '.com', 'blocked' => 0, ]; @@ -192,11 +192,11 @@ class UserControllerTest extends TestCase public function testUpdate(): void { // 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 = [ - 'email' => 'some-new@email' . random_int(1, 1000) . '.com', + 'email' => 'some-new@email' . random_int(1, 10000) . '.com', 'blocked' => 0, ]; diff --git a/tests/Feature/Controllers/Admin/LinkControllerTest.php b/tests/Feature/Controllers/Admin/LinkControllerTest.php index ccae616e9c..6a14b4ea01 100644 --- a/tests/Feature/Controllers/Admin/LinkControllerTest.php +++ b/tests/Feature/Controllers/Admin/LinkControllerTest.php @@ -162,9 +162,9 @@ class LinkControllerTest extends TestCase { $repository = $this->mock(LinkTypeRepositoryInterface::class); $data = [ - 'name' => 'test ' . random_int(1, 1000), - 'inward' => 'test inward' . random_int(1, 1000), - 'outward' => 'test outward' . random_int(1, 1000), + 'name' => 'test ' . random_int(1, 10000), + 'inward' => 'test inward' . random_int(1, 10000), + 'outward' => 'test outward' . random_int(1, 10000), ]; $repository->shouldReceive('store')->once()->andReturn(LinkType::first()); $repository->shouldReceive('findNull')->andReturn(LinkType::first()); @@ -184,9 +184,9 @@ class LinkControllerTest extends TestCase { $repository = $this->mock(LinkTypeRepositoryInterface::class); $data = [ - 'name' => 'test ' . random_int(1, 1000), - 'inward' => 'test inward' . random_int(1, 1000), - 'outward' => 'test outward' . random_int(1, 1000), + 'name' => 'test ' . random_int(1, 10000), + 'inward' => 'test inward' . random_int(1, 10000), + 'outward' => 'test outward' . random_int(1, 10000), 'create_another' => '1', ]; $repository->shouldReceive('store')->once()->andReturn(new LinkType); @@ -210,9 +210,9 @@ class LinkControllerTest extends TestCase $repository->shouldReceive('update')->once()->andReturn(new $linkType); $data = [ - 'name' => 'test ' . random_int(1, 1000), - 'inward' => 'test inward' . random_int(1, 1000), - 'outward' => 'test outward' . random_int(1, 1000), + 'name' => 'test ' . random_int(1, 10000), + 'inward' => 'test inward' . random_int(1, 10000), + 'outward' => 'test outward' . random_int(1, 10000), ]; $this->session(['link_types.edit.uri' => 'http://localhost']); $this->be($this->user()); @@ -231,9 +231,9 @@ class LinkControllerTest extends TestCase $linkType = LinkType::where('editable', 0)->first(); $data = [ - 'name' => 'test ' . random_int(1, 1000), - 'inward' => 'test inward' . random_int(1, 1000), - 'outward' => 'test outward' . random_int(1, 1000), + 'name' => 'test ' . random_int(1, 10000), + 'inward' => 'test inward' . random_int(1, 10000), + 'outward' => 'test outward' . random_int(1, 10000), 'return_to_edit' => '1', ]; $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']); $data = [ - 'name' => 'test ' . random_int(1, 1000), - 'inward' => 'test inward' . random_int(1, 1000), - 'outward' => 'test outward' . random_int(1, 1000), + 'name' => 'test ' . random_int(1, 10000), + 'inward' => 'test inward' . random_int(1, 10000), + 'outward' => 'test outward' . random_int(1, 10000), 'return_to_edit' => '1', ]; $repository->shouldReceive('update')->once()->andReturn(new $linkType); diff --git a/tests/Feature/Controllers/Import/IndexControllerTest.php b/tests/Feature/Controllers/Import/IndexControllerTest.php index e14c97e910..3d7a7b3d74 100644 --- a/tests/Feature/Controllers/Import/IndexControllerTest.php +++ b/tests/Feature/Controllers/Import/IndexControllerTest.php @@ -209,7 +209,7 @@ class IndexControllerTest extends TestCase $job = new ImportJob; $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->stage = 'go-for-import'; $job->provider = 'file'; diff --git a/tests/Feature/Controllers/Import/JobConfigurationControllerTest.php b/tests/Feature/Controllers/Import/JobConfigurationControllerTest.php index da05848ba2..0dcc0fbf89 100644 --- a/tests/Feature/Controllers/Import/JobConfigurationControllerTest.php +++ b/tests/Feature/Controllers/Import/JobConfigurationControllerTest.php @@ -53,7 +53,7 @@ class JobConfigurationControllerTest extends TestCase { $job = new ImportJob; $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->provider = 'fake'; $job->file_type = ''; @@ -85,7 +85,7 @@ class JobConfigurationControllerTest extends TestCase { $job = new ImportJob; $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->provider = 'fake'; $job->file_type = ''; @@ -111,7 +111,7 @@ class JobConfigurationControllerTest extends TestCase { $job = new ImportJob; $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->provider = 'fake'; $job->file_type = ''; @@ -140,7 +140,7 @@ class JobConfigurationControllerTest extends TestCase $job = new ImportJob; $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->provider = 'fake'; $job->file_type = ''; @@ -174,7 +174,7 @@ class JobConfigurationControllerTest extends TestCase $job = new ImportJob; $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->provider = 'fake'; $job->file_type = ''; @@ -203,7 +203,7 @@ class JobConfigurationControllerTest extends TestCase $job = new ImportJob; $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->provider = 'fake'; $job->file_type = ''; @@ -233,7 +233,7 @@ class JobConfigurationControllerTest extends TestCase $file = UploadedFile::fake()->image('avatar.jpg'); $job = new ImportJob; $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->provider = 'fake'; $job->file_type = ''; diff --git a/tests/Feature/Controllers/Import/JobStatusControllerTest.php b/tests/Feature/Controllers/Import/JobStatusControllerTest.php index a966948dd2..fac1f6ac8b 100644 --- a/tests/Feature/Controllers/Import/JobStatusControllerTest.php +++ b/tests/Feature/Controllers/Import/JobStatusControllerTest.php @@ -58,7 +58,7 @@ class JobStatusControllerTest extends TestCase { $job = new ImportJob; $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->provider = 'fake'; $job->file_type = ''; @@ -78,7 +78,7 @@ class JobStatusControllerTest extends TestCase { $job = new ImportJob; $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->provider = 'file'; $job->transactions = []; @@ -102,7 +102,7 @@ class JobStatusControllerTest extends TestCase $tag = $this->user()->tags()->first(); $job = new ImportJob; $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->provider = 'fake'; $job->transactions = []; @@ -132,7 +132,7 @@ class JobStatusControllerTest extends TestCase $job = new ImportJob; $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->provider = 'fake'; $job->transactions = []; @@ -161,7 +161,7 @@ class JobStatusControllerTest extends TestCase $job = new ImportJob; $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->provider = 'fake'; $job->transactions = []; @@ -185,7 +185,7 @@ class JobStatusControllerTest extends TestCase { $job = new ImportJob; $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->provider = 'fake'; $job->transactions = []; @@ -214,7 +214,7 @@ class JobStatusControllerTest extends TestCase { $job = new ImportJob; $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->provider = 'fake'; $job->transactions = []; @@ -244,7 +244,7 @@ class JobStatusControllerTest extends TestCase { $job = new ImportJob; $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->provider = 'fake'; $job->transactions = []; @@ -274,7 +274,7 @@ class JobStatusControllerTest extends TestCase { $job = new ImportJob; $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->provider = 'fake'; $job->transactions = []; @@ -295,7 +295,7 @@ class JobStatusControllerTest extends TestCase { $job = new ImportJob; $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->provider = 'fake'; $job->transactions = []; @@ -326,7 +326,7 @@ class JobStatusControllerTest extends TestCase { $job = new ImportJob; $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->provider = 'fake'; $job->transactions = []; @@ -357,7 +357,7 @@ class JobStatusControllerTest extends TestCase { $job = new ImportJob; $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->provider = 'fake'; $job->transactions = []; diff --git a/tests/Feature/Controllers/Import/PrerequisitesControllerTest.php b/tests/Feature/Controllers/Import/PrerequisitesControllerTest.php index 579d614f58..47e3da10d9 100644 --- a/tests/Feature/Controllers/Import/PrerequisitesControllerTest.php +++ b/tests/Feature/Controllers/Import/PrerequisitesControllerTest.php @@ -55,7 +55,7 @@ class PrerequisitesControllerTest extends TestCase { $job = new ImportJob; $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->provider = 'fake'; $job->transactions = []; @@ -85,7 +85,7 @@ class PrerequisitesControllerTest extends TestCase { $job = new ImportJob; $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->provider = 'fake'; $job->transactions = []; @@ -105,7 +105,7 @@ class PrerequisitesControllerTest extends TestCase { $job = new ImportJob; $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->provider = 'fake'; $job->transactions = []; @@ -136,7 +136,7 @@ class PrerequisitesControllerTest extends TestCase { $job = new ImportJob; $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->provider = 'fake'; $job->transactions = []; @@ -166,7 +166,7 @@ class PrerequisitesControllerTest extends TestCase { $job = new ImportJob; $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->provider = 'fake'; $job->transactions = []; @@ -213,7 +213,7 @@ class PrerequisitesControllerTest extends TestCase { $job = new ImportJob; $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->provider = 'fake'; $job->transactions = []; diff --git a/tests/Unit/Factory/AccountFactoryTest.php b/tests/Unit/Factory/AccountFactoryTest.php index 8c3f61e24d..58068f4cc9 100644 --- a/tests/Unit/Factory/AccountFactoryTest.php +++ b/tests/Unit/Factory/AccountFactoryTest.php @@ -49,7 +49,7 @@ class AccountFactoryTest extends TestCase 'account_type_id' => null, 'accountType' => 'asset', 'iban' => null, - 'name' => 'Basic asset account #' . random_int(1, 1000), + 'name' => 'Basic asset account #' . random_int(1, 10000), 'virtualBalance' => null, 'active' => true, 'accountRole' => 'defaultAsset', @@ -88,7 +88,7 @@ class AccountFactoryTest extends TestCase 'account_type_id' => null, 'accountType' => 'asset', 'iban' => null, - 'name' => 'Basic asset account #' . random_int(1, 1000), + 'name' => 'Basic asset account #' . random_int(1, 10000), 'virtualBalance' => '', 'active' => true, 'accountRole' => 'defaultAsset', @@ -127,7 +127,7 @@ class AccountFactoryTest extends TestCase 'account_type_id' => null, 'accountType' => 'asset', 'iban' => null, - 'name' => 'Basic CC account #' . random_int(1, 1000), + 'name' => 'Basic CC account #' . random_int(1, 10000), 'virtualBalance' => null, 'active' => true, 'accountRole' => 'ccAsset', @@ -174,7 +174,7 @@ class AccountFactoryTest extends TestCase 'account_type_id' => null, 'accountType' => 'expense', 'iban' => null, - 'name' => 'Basic expense account #' . random_int(1, 1000), + 'name' => 'Basic expense account #' . random_int(1, 10000), 'virtualBalance' => '1243', 'active' => true, 'accountRole' => 'defaultAsset', @@ -213,7 +213,7 @@ class AccountFactoryTest extends TestCase 'account_type_id' => null, 'accountType' => 'Expense account', 'iban' => null, - 'name' => 'Basic expense account #' . random_int(1, 1000), + 'name' => 'Basic expense account #' . random_int(1, 10000), 'virtualBalance' => '1243', 'active' => true, 'accountRole' => 'defaultAsset', @@ -251,7 +251,7 @@ class AccountFactoryTest extends TestCase 'account_type_id' => null, 'accountType' => 'asset', 'iban' => null, - 'name' => 'Basic asset account #' . random_int(1, 1000), + 'name' => 'Basic asset account #' . random_int(1, 10000), 'virtualBalance' => null, 'active' => true, 'accountRole' => 'defaultAsset', @@ -297,7 +297,7 @@ class AccountFactoryTest extends TestCase 'account_type_id' => null, 'accountType' => 'asset', 'iban' => null, - 'name' => 'Basic asset account #' . random_int(1, 1000), + 'name' => 'Basic asset account #' . random_int(1, 10000), 'virtualBalance' => null, 'active' => true, 'accountRole' => 'defaultAsset', @@ -342,7 +342,7 @@ class AccountFactoryTest extends TestCase 'account_type_id' => null, 'accountType' => 'asset', 'iban' => 'NL02ABNA0870809585', - 'name' => 'Basic asset account #' . random_int(1, 1000), + 'name' => 'Basic asset account #' . random_int(1, 10000), 'virtualBalance' => null, 'active' => true, 'accountRole' => 'defaultAsset', @@ -381,7 +381,7 @@ class AccountFactoryTest extends TestCase 'account_type_id' => null, 'accountType' => 'asset', 'iban' => 'NL1XRABO032674X238', - 'name' => 'Basic asset account #' . random_int(1, 1000), + 'name' => 'Basic asset account #' . random_int(1, 10000), 'virtualBalance' => null, 'active' => true, 'accountRole' => 'defaultAsset', @@ -420,7 +420,7 @@ class AccountFactoryTest extends TestCase 'account_type_id' => null, 'accountType' => 'asset', 'iban' => null, - 'name' => 'Basic asset account #' . random_int(1, 1000), + 'name' => 'Basic asset account #' . random_int(1, 10000), 'virtualBalance' => null, 'active' => true, 'accountRole' => 'defaultAsset', @@ -466,7 +466,7 @@ class AccountFactoryTest extends TestCase 'account_type_id' => null, 'accountType' => 'asset', 'iban' => null, - 'name' => 'Basic asset account #' . random_int(1, 1000), + 'name' => 'Basic asset account #' . random_int(1, 10000), 'virtualBalance' => null, 'active' => true, 'accountRole' => 'defaultAsset', diff --git a/tests/Unit/Factory/BillFactoryTest.php b/tests/Unit/Factory/BillFactoryTest.php index 74203bef86..af07cc5dda 100644 --- a/tests/Unit/Factory/BillFactoryTest.php +++ b/tests/Unit/Factory/BillFactoryTest.php @@ -42,7 +42,7 @@ class BillFactoryTest extends TestCase public function testCreateBasic(): void { $data = [ - 'name' => 'Some new bill #' . random_int(1, 1000), + 'name' => 'Some new bill #' . random_int(1, 10000), 'amount_min' => '5', 'transaction_currency_id' => 1, 'amount_max' => '10', @@ -76,7 +76,7 @@ class BillFactoryTest extends TestCase public function testCreateEmptyNotes(): void { $data = [ - 'name' => 'Some new bill #' . random_int(1, 1000), + 'name' => 'Some new bill #' . random_int(1, 10000), 'amount_min' => '5', 'amount_max' => '10', 'date' => '2018-01-01', @@ -144,7 +144,7 @@ class BillFactoryTest extends TestCase /** @var BillFactory $factory */ $factory = app(BillFactory::class); $factory->setUser($this->user()); - $piggy = $factory->find(null, 'I dont exist' . random_int(1, 1000)); + $piggy = $factory->find(null, 'I dont exist' . random_int(1, 10000)); $this->assertNull($piggy); } diff --git a/tests/Unit/Factory/BudgetFactoryTest.php b/tests/Unit/Factory/BudgetFactoryTest.php index 32397d5a4a..5544a4ba70 100644 --- a/tests/Unit/Factory/BudgetFactoryTest.php +++ b/tests/Unit/Factory/BudgetFactoryTest.php @@ -91,7 +91,7 @@ class BudgetFactoryTest extends TestCase /** @var BudgetFactory $factory */ $factory = app(BudgetFactory::class); $factory->setUser($this->user()); - $this->assertNull($factory->find(null, 'I dont exist.' . random_int(1, 1000))); + $this->assertNull($factory->find(null, 'I dont exist.' . random_int(1, 10000))); } } diff --git a/tests/Unit/Factory/CategoryFactoryTest.php b/tests/Unit/Factory/CategoryFactoryTest.php index 706f6dced3..f98e9b353d 100644 --- a/tests/Unit/Factory/CategoryFactoryTest.php +++ b/tests/Unit/Factory/CategoryFactoryTest.php @@ -80,7 +80,7 @@ class CategoryFactoryTest extends TestCase */ public function testFindOrCreateNewName(): void { - $name = 'Some new category #' . random_int(1, 1000); + $name = 'Some new category #' . random_int(1, 10000); /** @var CategoryFactory $factory */ $factory = app(CategoryFactory::class); diff --git a/tests/Unit/Factory/PiggyBankFactoryTest.php b/tests/Unit/Factory/PiggyBankFactoryTest.php index 042e63856a..ff36f2d594 100644 --- a/tests/Unit/Factory/PiggyBankFactoryTest.php +++ b/tests/Unit/Factory/PiggyBankFactoryTest.php @@ -91,6 +91,6 @@ class PiggyBankFactoryTest extends TestCase /** @var PiggyBankFactory $factory */ $factory = app(PiggyBankFactory::class); $factory->setUser($this->user()); - $this->assertNull($factory->find(null, 'I dont exist.' . random_int(1, 1000))); + $this->assertNull($factory->find(null, 'I dont exist.' . random_int(1, 10000))); } } diff --git a/tests/Unit/Factory/TagFactoryTest.php b/tests/Unit/Factory/TagFactoryTest.php index 67c3c0093e..284ac8c6c6 100644 --- a/tests/Unit/Factory/TagFactoryTest.php +++ b/tests/Unit/Factory/TagFactoryTest.php @@ -51,7 +51,7 @@ class TagFactoryTest extends TestCase */ public function testFindOrCreateNew(): void { - $tag = 'Some new tag#' . random_int(1, 1000); + $tag = 'Some new tag#' . random_int(1, 10000); /** @var TagFactory $factory */ $factory = app(TagFactory::class); $factory->setUser($this->user()); diff --git a/tests/Unit/Import/JobConfiguration/FakeJobConfigurationTest.php b/tests/Unit/Import/JobConfiguration/FakeJobConfigurationTest.php index c0ed25f96c..61dc12ba5a 100644 --- a/tests/Unit/Import/JobConfiguration/FakeJobConfigurationTest.php +++ b/tests/Unit/Import/JobConfiguration/FakeJobConfigurationTest.php @@ -43,7 +43,7 @@ class FakeJobConfigurationTest extends TestCase { $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'A_unit_' . random_int(1, 1000); + $job->key = 'A_unit_' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'fake'; @@ -66,7 +66,7 @@ class FakeJobConfigurationTest extends TestCase { $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'B_unit_' . random_int(1, 1000); + $job->key = 'B_unit_' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'needs_config'; $job->provider = 'fake'; @@ -89,7 +89,7 @@ class FakeJobConfigurationTest extends TestCase { $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'C_unit_' . random_int(1, 1000); + $job->key = 'C_unit_' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'fake'; @@ -114,7 +114,7 @@ class FakeJobConfigurationTest extends TestCase { $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'D_unit_' . random_int(1, 1000); + $job->key = 'D_unit_' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'config'; $job->provider = 'fake'; @@ -142,7 +142,7 @@ class FakeJobConfigurationTest extends TestCase { $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'E_unit_' . random_int(1, 1000); + $job->key = 'E_unit_' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'fake'; @@ -169,7 +169,7 @@ class FakeJobConfigurationTest extends TestCase { $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'f_unit_' . random_int(1, 1000); + $job->key = 'f_unit_' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'config'; $job->provider = 'fake'; @@ -197,7 +197,7 @@ class FakeJobConfigurationTest extends TestCase { $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'g_unit_' . random_int(1, 1000); + $job->key = 'g_unit_' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'fake'; @@ -224,7 +224,7 @@ class FakeJobConfigurationTest extends TestCase { $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'h_unit_' . random_int(1, 1000); + $job->key = 'h_unit_' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'fake'; @@ -259,7 +259,7 @@ class FakeJobConfigurationTest extends TestCase { $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'i_unit_' . random_int(1, 1000); + $job->key = 'i_unit_' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'fake'; @@ -294,7 +294,7 @@ class FakeJobConfigurationTest extends TestCase { $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'j_unit_' . random_int(1, 1000); + $job->key = 'j_unit_' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'fake'; @@ -329,7 +329,7 @@ class FakeJobConfigurationTest extends TestCase { $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'k_unit_' . random_int(1, 1000); + $job->key = 'k_unit_' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'fake'; @@ -364,7 +364,7 @@ class FakeJobConfigurationTest extends TestCase { $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'l_unit_' . random_int(1, 1000); + $job->key = 'l_unit_' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'fake'; @@ -399,7 +399,7 @@ class FakeJobConfigurationTest extends TestCase { $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'm_unit_' . random_int(1, 1000); + $job->key = 'm_unit_' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'fake'; @@ -434,7 +434,7 @@ class FakeJobConfigurationTest extends TestCase { $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'n_unit_' . random_int(1, 1000); + $job->key = 'n_unit_' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'fake'; @@ -469,7 +469,7 @@ class FakeJobConfigurationTest extends TestCase { $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'o_unit_' . random_int(1, 1000); + $job->key = 'o_unit_' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'fake'; @@ -504,7 +504,7 @@ class FakeJobConfigurationTest extends TestCase { $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'p_unit_' . random_int(1, 1000); + $job->key = 'p_unit_' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'not_new'; $job->provider = 'fake'; @@ -528,7 +528,7 @@ class FakeJobConfigurationTest extends TestCase { $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'p_unit_' . random_int(1, 1000); + $job->key = 'p_unit_' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'fake'; @@ -552,7 +552,7 @@ class FakeJobConfigurationTest extends TestCase { $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'p_unit_' . random_int(1, 1000); + $job->key = 'p_unit_' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'fake'; @@ -576,7 +576,7 @@ class FakeJobConfigurationTest extends TestCase { $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'p_unit_' . random_int(1, 1000); + $job->key = 'p_unit_' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'fake'; diff --git a/tests/Unit/Import/JobConfiguration/FileJobConfigurationTest.php b/tests/Unit/Import/JobConfiguration/FileJobConfigurationTest.php index 8ee551a236..c927e5c229 100644 --- a/tests/Unit/Import/JobConfiguration/FileJobConfigurationTest.php +++ b/tests/Unit/Import/JobConfiguration/FileJobConfigurationTest.php @@ -49,7 +49,7 @@ class FileJobConfigurationTest extends TestCase { $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'File_A_unit_' . random_int(1, 1000); + $job->key = 'File_A_unit_' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'fake'; @@ -72,7 +72,7 @@ class FileJobConfigurationTest extends TestCase { $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'File_B_unit_' . random_int(1, 1000); + $job->key = 'File_B_unit_' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'ready_to_run'; $job->provider = 'fake'; @@ -95,7 +95,7 @@ class FileJobConfigurationTest extends TestCase { $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'I-file_' . random_int(1, 1000); + $job->key = 'I-Cfile_' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'map'; $job->provider = 'file'; @@ -103,8 +103,8 @@ class FileJobConfigurationTest extends TestCase $job->configuration = []; $job->save(); - $bag = new MessageBag; - $result = null; + $bag = new MessageBag; + $result = null; $configurator = new FileJobConfiguration; $configurator->setImportJob($job); @@ -130,7 +130,7 @@ class FileJobConfigurationTest extends TestCase { $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'G-file_' . random_int(1, 1000); + $job->key = 'G-Dfile_' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'configure-upload'; $job->provider = 'file'; @@ -163,7 +163,7 @@ class FileJobConfigurationTest extends TestCase { $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'H-file_' . random_int(1, 1000); + $job->key = 'H-Efile_' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'map'; $job->provider = 'file'; @@ -196,7 +196,7 @@ class FileJobConfigurationTest extends TestCase { $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'F-file_' . random_int(1, 1000); + $job->key = 'F-fFile_' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'file'; @@ -229,7 +229,7 @@ class FileJobConfigurationTest extends TestCase { $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'H-file_' . random_int(1, 1000); + $job->key = 'H-fiGle_' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'roles'; $job->provider = 'file'; @@ -262,7 +262,7 @@ class FileJobConfigurationTest extends TestCase { $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'Dfile_' . random_int(1, 1000); + $job->key = 'DfiHle_' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'configure-upload'; $job->provider = 'file'; @@ -290,7 +290,7 @@ class FileJobConfigurationTest extends TestCase { $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'Ffile_' . random_int(1, 1000); + $job->key = 'FfilIe_' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'map'; $job->provider = 'file'; @@ -318,7 +318,7 @@ class FileJobConfigurationTest extends TestCase { $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'Cfile_' . random_int(1, 1000); + $job->key = 'CfJile_' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'file'; @@ -346,7 +346,7 @@ class FileJobConfigurationTest extends TestCase { $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'Efile_' . random_int(1, 1000); + $job->key = 'EfiKle_' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'roles'; $job->provider = 'file'; diff --git a/tests/Unit/Import/JobConfiguration/SpectreJobConfigurationTest.php b/tests/Unit/Import/JobConfiguration/SpectreJobConfigurationTest.php index 226a6e5dce..dc114e789a 100644 --- a/tests/Unit/Import/JobConfiguration/SpectreJobConfigurationTest.php +++ b/tests/Unit/Import/JobConfiguration/SpectreJobConfigurationTest.php @@ -46,7 +46,7 @@ class SpectreJobConfigurationTest extends TestCase { $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'spectre_jc_A' . random_int(1, 1000); + $job->key = 'spectre_jc_A' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'spectre'; @@ -75,7 +75,7 @@ class SpectreJobConfigurationTest extends TestCase { $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'spectre_jc_B' . random_int(1, 1000); + $job->key = 'spectre_jc_B' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'do-authenticate'; $job->provider = 'spectre'; @@ -107,7 +107,7 @@ class SpectreJobConfigurationTest extends TestCase { $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'spectre_jc_C' . random_int(1, 1000); + $job->key = 'spectre_jc_C' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'choose-login'; $job->provider = 'spectre'; @@ -137,7 +137,7 @@ class SpectreJobConfigurationTest extends TestCase { $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'spectre_jc_D' . random_int(1, 1000); + $job->key = 'spectre_jc_D' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'authenticated'; $job->provider = 'spectre'; @@ -166,7 +166,7 @@ class SpectreJobConfigurationTest extends TestCase { $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'spectre_jc_E' . random_int(1, 1000); + $job->key = 'spectre_jc_E' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'choose-accounts'; $job->provider = 'spectre'; diff --git a/tests/Unit/Import/Routine/BunqRoutineTest.php b/tests/Unit/Import/Routine/BunqRoutineTest.php index eb53266989..a2a3b6f28a 100644 --- a/tests/Unit/Import/Routine/BunqRoutineTest.php +++ b/tests/Unit/Import/Routine/BunqRoutineTest.php @@ -45,7 +45,7 @@ class BunqRoutineTest extends TestCase { $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'brY_' . random_int(1, 1000); + $job->key = 'brY_' . random_int(1, 10000); $job->status = 'ready_to_run'; $job->stage = 'go-for-import'; $job->provider = 'bunq'; @@ -84,7 +84,7 @@ class BunqRoutineTest extends TestCase { $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'brX_' . random_int(1, 1000); + $job->key = 'brX_' . random_int(1, 10000); $job->status = 'ready_to_run'; $job->stage = 'new'; $job->provider = 'bunq'; diff --git a/tests/Unit/Import/Routine/FakeRoutineTest.php b/tests/Unit/Import/Routine/FakeRoutineTest.php index d85c8d5392..e1c87cb448 100644 --- a/tests/Unit/Import/Routine/FakeRoutineTest.php +++ b/tests/Unit/Import/Routine/FakeRoutineTest.php @@ -45,7 +45,7 @@ class FakeRoutineTest extends TestCase { $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'a_route_' . random_int(1, 1000); + $job->key = 'a_route_' . random_int(1, 10000); $job->status = 'ready_to_run'; $job->stage = 'ahoy'; $job->provider = 'fake'; @@ -81,7 +81,7 @@ class FakeRoutineTest extends TestCase { $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'a_route_' . random_int(1, 1000); + $job->key = 'a_route_' . random_int(1, 10000); $job->status = 'ready_to_run'; $job->stage = 'final'; $job->provider = 'fake'; @@ -118,7 +118,7 @@ class FakeRoutineTest extends TestCase { $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'a_route_' . random_int(1, 1000); + $job->key = 'a_route_' . random_int(1, 10000); $job->status = 'ready_to_run'; $job->stage = 'new'; $job->provider = 'fake'; diff --git a/tests/Unit/Import/Routine/FileRoutineTest.php b/tests/Unit/Import/Routine/FileRoutineTest.php index 48a109030f..69e4dee94e 100644 --- a/tests/Unit/Import/Routine/FileRoutineTest.php +++ b/tests/Unit/Import/Routine/FileRoutineTest.php @@ -45,7 +45,7 @@ class FileRoutineTest extends TestCase { $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'a_fr_' . random_int(1, 1000); + $job->key = 'a_fr_' . random_int(1, 10000); $job->status = 'ready_to_run'; $job->stage = 'ready_to_run'; $job->provider = 'file'; diff --git a/tests/Unit/Import/Routine/SpectreRoutineTest.php b/tests/Unit/Import/Routine/SpectreRoutineTest.php index 8267ed506c..557df164ae 100644 --- a/tests/Unit/Import/Routine/SpectreRoutineTest.php +++ b/tests/Unit/Import/Routine/SpectreRoutineTest.php @@ -46,7 +46,7 @@ class SpectreRoutineTest extends TestCase { $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'SR1A' . random_int(1, 1000); + $job->key = 'SR1A' . random_int(1, 10000); $job->status = 'ready_to_run'; $job->stage = 'do-authenticate'; $job->provider = 'spectre'; @@ -77,7 +77,7 @@ class SpectreRoutineTest extends TestCase { $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'SR2b' . random_int(1, 1000); + $job->key = 'SR2b' . random_int(1, 10000); $job->status = 'ready_to_run'; $job->stage = 'authenticated'; $job->provider = 'spectre'; @@ -115,7 +115,7 @@ class SpectreRoutineTest extends TestCase { $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'SR3c' . random_int(1, 1000); + $job->key = 'SR3c' . random_int(1, 10000); $job->status = 'ready_to_run'; $job->stage = 'go-for-import'; $job->provider = 'spectre'; @@ -154,7 +154,7 @@ class SpectreRoutineTest extends TestCase { $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'SR4A' . random_int(1, 1000); + $job->key = 'SR4A' . random_int(1, 10000); $job->status = 'ready_to_run'; $job->stage = 'new'; $job->provider = 'spectre'; @@ -194,7 +194,7 @@ class SpectreRoutineTest extends TestCase { $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'SR5A' . random_int(1, 1000); + $job->key = 'SR5A' . random_int(1, 10000); $job->status = 'ready_to_run'; $job->stage = 'new'; $job->provider = 'spectre'; diff --git a/tests/Unit/Import/Storage/ImportArrayStorageTest.php b/tests/Unit/Import/Storage/ImportArrayStorageTest.php index 21b646e342..0b8a96b017 100644 --- a/tests/Unit/Import/Storage/ImportArrayStorageTest.php +++ b/tests/Unit/Import/Storage/ImportArrayStorageTest.php @@ -58,7 +58,7 @@ class ImportArrayStorageTest extends TestCase // make fake job $job = new ImportJob; $job->user()->associate($this->user()); - $job->key = 'a_storage' . random_int(1, 1000); + $job->key = 'a_storage' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'fake'; @@ -99,7 +99,7 @@ class ImportArrayStorageTest extends TestCase // make fake job $job = new ImportJob; $job->user()->associate($this->user()); - $job->key = 'h_storage' . random_int(1, 1000); + $job->key = 'h_storage' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'fake'; @@ -171,7 +171,7 @@ class ImportArrayStorageTest extends TestCase $transactions = [$this->singleWithdrawal(), $this->singleWithdrawal()]; $job = new ImportJob; $job->user()->associate($this->user()); - $job->key = 'b_storage' . random_int(1, 1000); + $job->key = 'b_storage' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'fake'; @@ -232,7 +232,7 @@ class ImportArrayStorageTest extends TestCase // make fake job $job = new ImportJob; $job->user()->associate($this->user()); - $job->key = 'c_storage' . random_int(1, 1000); + $job->key = 'c_storage' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'fake'; @@ -271,7 +271,7 @@ class ImportArrayStorageTest extends TestCase // make fake job $job = new ImportJob; $job->user()->associate($this->user()); - $job->key = 'd_storage' . random_int(1, 1000); + $job->key = 'd_storage' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'fake'; @@ -313,7 +313,7 @@ class ImportArrayStorageTest extends TestCase // make fake job $job = new ImportJob; $job->user()->associate($this->user()); - $job->key = 'e_storage' . random_int(1, 1000); + $job->key = 'e_storage' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'fake'; @@ -364,7 +364,7 @@ class ImportArrayStorageTest extends TestCase // make fake job $job = new ImportJob; $job->user()->associate($this->user()); - $job->key = 'f_storage' . random_int(1, 1000); + $job->key = 'f_storage' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'fake'; @@ -419,7 +419,7 @@ class ImportArrayStorageTest extends TestCase // make fake job $job = new ImportJob; $job->user()->associate($this->user()); - $job->key = 'g_storage' . random_int(1, 1000); + $job->key = 'g_storage' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'fake'; diff --git a/tests/Unit/Services/Internal/Destroy/AccountDestroyServiceTest.php b/tests/Unit/Services/Internal/Destroy/AccountDestroyServiceTest.php index 1777874cf8..e22adeee6d 100644 --- a/tests/Unit/Services/Internal/Destroy/AccountDestroyServiceTest.php +++ b/tests/Unit/Services/Internal/Destroy/AccountDestroyServiceTest.php @@ -40,7 +40,7 @@ class AccountDestroyServiceTest extends TestCase public function testDestroyBasic(): void { $account = Account::create( - ['user_id' => $this->user()->id, 'account_type_id' => 1, 'name' => 'Some name #' . random_int(1, 1000), + ['user_id' => $this->user()->id, 'account_type_id' => 1, 'name' => 'Some name #' . random_int(1, 10000), 'virtual_balance' => '0', 'iban' => null, 'active' => true] ); /** @var AccountDestroyService $service */ @@ -57,7 +57,7 @@ class AccountDestroyServiceTest extends TestCase { // create objects: $account = Account::create( - ['user_id' => $this->user()->id, 'account_type_id' => 1, 'name' => 'Some name #' . random_int(1, 1000), + ['user_id' => $this->user()->id, 'account_type_id' => 1, 'name' => 'Some name #' . random_int(1, 10000), 'virtual_balance' => '0', 'iban' => null, 'active' => true] ); Transaction::create(['account_id' => $account->id, 'transaction_journal_id' => 1, 'amount' => 10, 'transaction_currency_id' => 1]); @@ -79,11 +79,11 @@ class AccountDestroyServiceTest extends TestCase public function testDestroyMove(): void { $account = Account::create( - ['user_id' => $this->user()->id, 'account_type_id' => 1, 'name' => 'Some name #' . random_int(1, 1000), + ['user_id' => $this->user()->id, 'account_type_id' => 1, 'name' => 'Some name #' . random_int(1, 10000), 'virtual_balance' => '0', 'iban' => null, 'active' => true] ); $move = Account::create( - ['user_id' => $this->user()->id, 'account_type_id' => 1, 'name' => 'Some name #' . random_int(1, 1000), + ['user_id' => $this->user()->id, 'account_type_id' => 1, 'name' => 'Some name #' . random_int(1, 10000), 'virtual_balance' => '0', 'iban' => null, 'active' => true] ); $transaction = Transaction::create(['account_id' => $account->id, 'transaction_journal_id' => 1, 'amount' => 10, 'transaction_currency_id' => 1]); diff --git a/tests/Unit/Services/Internal/Update/AccountUpdateServiceTest.php b/tests/Unit/Services/Internal/Update/AccountUpdateServiceTest.php index 20eb24074f..78d2873381 100644 --- a/tests/Unit/Services/Internal/Update/AccountUpdateServiceTest.php +++ b/tests/Unit/Services/Internal/Update/AccountUpdateServiceTest.php @@ -46,7 +46,7 @@ class AccountUpdateServiceTest extends TestCase { /** @var Account $account */ $account = Account::create( - ['user_id' => $this->user()->id, 'account_type_id' => 1, 'name' => 'Some name #' . random_int(1, 1000), + ['user_id' => $this->user()->id, 'account_type_id' => 1, 'name' => 'Some name #' . random_int(1, 10000), 'virtual_balance' => '0', 'iban' => null, 'active' => true] ); $opposing = $this->user()->accounts()->first(); @@ -67,7 +67,7 @@ class AccountUpdateServiceTest extends TestCase $data = [ - 'name' => 'Some new name #' . random_int(1, 1000), + 'name' => 'Some new name #' . random_int(1, 10000), 'active' => true, 'virtualBalance' => '0', 'iban' => null, @@ -96,7 +96,7 @@ class AccountUpdateServiceTest extends TestCase /** @var Account $account */ $account = $this->user()->accounts()->first(); $data = [ - 'name' => 'Some new name #' . random_int(1, 1000), + 'name' => 'Some new name #' . random_int(1, 10000), 'active' => true, 'virtualBalance' => '0', 'iban' => null, @@ -119,7 +119,7 @@ class AccountUpdateServiceTest extends TestCase /** @var Account $account */ $account = $this->user()->accounts()->first(); $data = [ - 'name' => 'Some new name #' . random_int(1, 1000), + 'name' => 'Some new name #' . random_int(1, 10000), 'active' => true, 'virtualBalance' => '0', 'iban' => null, @@ -149,7 +149,7 @@ class AccountUpdateServiceTest extends TestCase $note->save(); $data = [ - 'name' => 'Some new name #' . random_int(1, 1000), + 'name' => 'Some new name #' . random_int(1, 10000), 'active' => true, 'virtualBalance' => '0', 'iban' => null, @@ -174,7 +174,7 @@ class AccountUpdateServiceTest extends TestCase { /** @var Account $account */ $account = Account::create( - ['user_id' => $this->user()->id, 'account_type_id' => 1, 'name' => 'Some name #' . random_int(1, 1000), + ['user_id' => $this->user()->id, 'account_type_id' => 1, 'name' => 'Some name #' . random_int(1, 10000), 'virtual_balance' => '0', 'iban' => null, 'active' => true] ); $opposing = $this->user()->accounts()->first(); @@ -195,7 +195,7 @@ class AccountUpdateServiceTest extends TestCase $data = [ - 'name' => 'Some new name #' . random_int(1, 1000), + 'name' => 'Some new name #' . random_int(1, 10000), 'active' => true, 'virtualBalance' => '0', 'iban' => null, @@ -229,7 +229,7 @@ class AccountUpdateServiceTest extends TestCase /** @var Account $account */ $account = Account::create( - ['user_id' => $this->user()->id, 'account_type_id' => 1, 'name' => 'Some name #' . random_int(1, 1000), + ['user_id' => $this->user()->id, 'account_type_id' => 1, 'name' => 'Some name #' . random_int(1, 10000), 'virtual_balance' => '0', 'iban' => null, 'active' => true] ); $opposing = $this->user()->accounts()->first(); @@ -250,7 +250,7 @@ class AccountUpdateServiceTest extends TestCase $data = [ - 'name' => 'Some new name #' . random_int(1, 1000), + 'name' => 'Some new name #' . random_int(1, 10000), 'active' => true, 'virtualBalance' => '0', 'iban' => null, @@ -281,11 +281,11 @@ class AccountUpdateServiceTest extends TestCase { /** @var Account $account */ $account = Account::create( - ['user_id' => $this->user()->id, 'account_type_id' => 1, 'name' => 'Some name #' . random_int(1, 1000), + ['user_id' => $this->user()->id, 'account_type_id' => 1, 'name' => 'Some name #' . random_int(1, 10000), 'virtual_balance' => '0', 'iban' => null, 'active' => true] ); $data = [ - 'name' => 'Some new name #' . random_int(1, 1000), + 'name' => 'Some new name #' . random_int(1, 10000), 'active' => true, 'virtualBalance' => '0', 'iban' => null, diff --git a/tests/Unit/Services/Internal/Update/JournalUpdateServiceTest.php b/tests/Unit/Services/Internal/Update/JournalUpdateServiceTest.php index 170d960fdd..f7e4637fc0 100644 --- a/tests/Unit/Services/Internal/Update/JournalUpdateServiceTest.php +++ b/tests/Unit/Services/Internal/Update/JournalUpdateServiceTest.php @@ -65,7 +65,7 @@ class JournalUpdateServiceTest extends TestCase /** @var TransactionJournal $journal */ $journal = $this->user()->transactionJournals()->where('transaction_type_id', 2)->first(); $data = [ - 'description' => 'Updated journal #' . random_int(1, 1000), + 'description' => 'Updated journal #' . random_int(1, 10000), 'date' => new Carbon('2018-01-01'), 'bill_id' => null, 'bill_name' => null, @@ -107,7 +107,7 @@ class JournalUpdateServiceTest extends TestCase /** @var TransactionJournal $journal */ $journal = $this->user()->transactionJournals()->inRandomOrder()->where('transaction_type_id', 2)->first(); $data = [ - 'description' => 'Updated journal #' . random_int(1, 1000), + 'description' => 'Updated journal #' . random_int(1, 10000), 'date' => new Carbon('2018-01-01'), 'bill_id' => null, 'bill_name' => null, @@ -199,7 +199,7 @@ class JournalUpdateServiceTest extends TestCase /** @var TransactionJournal $journal */ $journal = $this->user()->transactionJournals()->skip(4)->where('transaction_type_id', 1)->first(); $data = [ - 'description' => 'Updated journal #' . random_int(1, 1000), + 'description' => 'Updated journal #' . random_int(1, 10000), 'date' => new Carbon('2018-01-01'), 'bill_id' => null, 'bill_name' => null, diff --git a/tests/Unit/Support/Import/JobConfiguration/Bunq/ChooseAccountsHandlerTest.php b/tests/Unit/Support/Import/JobConfiguration/Bunq/ChooseAccountsHandlerTest.php index ce2bb7022f..427a848272 100644 --- a/tests/Unit/Support/Import/JobConfiguration/Bunq/ChooseAccountsHandlerTest.php +++ b/tests/Unit/Support/Import/JobConfiguration/Bunq/ChooseAccountsHandlerTest.php @@ -50,7 +50,7 @@ class ChooseAccountsHandlerTest extends TestCase { $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'caha' . random_int(1, 1000); + $job->key = 'caha' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'bunq'; @@ -81,7 +81,7 @@ class ChooseAccountsHandlerTest extends TestCase { $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'cahb' . random_int(1, 1000); + $job->key = 'cahb' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'bunq'; @@ -114,7 +114,7 @@ class ChooseAccountsHandlerTest extends TestCase { $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'cahc' . random_int(1, 1000); + $job->key = 'cahc' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'bunq'; @@ -168,7 +168,7 @@ class ChooseAccountsHandlerTest extends TestCase { $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'cahd' . random_int(1, 1000); + $job->key = 'cahd' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'bunq'; @@ -222,7 +222,7 @@ class ChooseAccountsHandlerTest extends TestCase { $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'cahe' . random_int(1, 1000); + $job->key = 'cahe' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'bunq'; @@ -276,7 +276,7 @@ class ChooseAccountsHandlerTest extends TestCase { $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'cahf' . random_int(1, 1000); + $job->key = 'cahf' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'bunq'; @@ -323,7 +323,7 @@ class ChooseAccountsHandlerTest extends TestCase { $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'cahg' . random_int(1, 1000); + $job->key = 'cahg' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'bunq'; @@ -386,7 +386,7 @@ class ChooseAccountsHandlerTest extends TestCase { $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'cahg' . random_int(1, 1000); + $job->key = 'cahg' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'bunq'; diff --git a/tests/Unit/Support/Import/JobConfiguration/Bunq/NewBunqJobHandlerTest.php b/tests/Unit/Support/Import/JobConfiguration/Bunq/NewBunqJobHandlerTest.php index cc407f65dc..089a87e92b 100644 --- a/tests/Unit/Support/Import/JobConfiguration/Bunq/NewBunqJobHandlerTest.php +++ b/tests/Unit/Support/Import/JobConfiguration/Bunq/NewBunqJobHandlerTest.php @@ -39,7 +39,7 @@ class NewBunqJobHandlerTest extends TestCase { $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'cXha' . random_int(1, 1000); + $job->key = 'cXha' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'bunq'; diff --git a/tests/Unit/Support/Import/JobConfiguration/File/ConfigureMappingHandlerTest.php b/tests/Unit/Support/Import/JobConfiguration/File/ConfigureMappingHandlerTest.php index eabd82eafa..a85ca2dda2 100644 --- a/tests/Unit/Support/Import/JobConfiguration/File/ConfigureMappingHandlerTest.php +++ b/tests/Unit/Support/Import/JobConfiguration/File/ConfigureMappingHandlerTest.php @@ -51,7 +51,7 @@ class ConfigureMappingHandlerTest extends TestCase { $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'mapG' . random_int(1, 1000); + $job->key = 'mapG' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'fake'; @@ -118,7 +118,7 @@ class ConfigureMappingHandlerTest extends TestCase $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'mapA' . random_int(1, 1000); + $job->key = 'mapA' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'fake'; @@ -150,7 +150,7 @@ class ConfigureMappingHandlerTest extends TestCase { $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'mapE' . random_int(1, 1000); + $job->key = 'mapE' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'fake'; @@ -214,7 +214,7 @@ class ConfigureMappingHandlerTest extends TestCase $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'mapC' . random_int(1, 1000); + $job->key = 'mapC' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'fake'; @@ -243,7 +243,7 @@ class ConfigureMappingHandlerTest extends TestCase { $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'mapH' . random_int(1, 1000); + $job->key = 'mapH' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'fake'; @@ -324,7 +324,7 @@ class ConfigureMappingHandlerTest extends TestCase { $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'mapD' . random_int(1, 1000); + $job->key = 'mapD' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'fake'; @@ -352,7 +352,7 @@ class ConfigureMappingHandlerTest extends TestCase { $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'mapF' . random_int(1, 1000); + $job->key = 'mapF' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'fake'; @@ -439,7 +439,7 @@ class ConfigureMappingHandlerTest extends TestCase $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'mapB' . random_int(1, 1000); + $job->key = 'mapB' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'fake'; @@ -468,7 +468,7 @@ class ConfigureMappingHandlerTest extends TestCase $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'mapB' . random_int(1, 1000); + $job->key = 'mapB' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'fake'; diff --git a/tests/Unit/Support/Import/JobConfiguration/File/ConfigureRolesHandlerTest.php b/tests/Unit/Support/Import/JobConfiguration/File/ConfigureRolesHandlerTest.php index daf05e3553..0810a2971d 100644 --- a/tests/Unit/Support/Import/JobConfiguration/File/ConfigureRolesHandlerTest.php +++ b/tests/Unit/Support/Import/JobConfiguration/File/ConfigureRolesHandlerTest.php @@ -117,7 +117,7 @@ class ConfigureRolesHandlerTest extends TestCase { $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'role-B' . random_int(1, 1000); + $job->key = 'role-B' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'fake'; @@ -193,7 +193,7 @@ class ConfigureRolesHandlerTest extends TestCase { $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'role-x' . random_int(1, 1000); + $job->key = 'role-x' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'fake'; @@ -270,7 +270,7 @@ class ConfigureRolesHandlerTest extends TestCase { $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'role-x' . random_int(1, 1000); + $job->key = 'role-x' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'fake'; @@ -340,7 +340,7 @@ class ConfigureRolesHandlerTest extends TestCase { $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'role-x' . random_int(1, 1000); + $job->key = 'role-x' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'fake'; @@ -504,7 +504,7 @@ class ConfigureRolesHandlerTest extends TestCase { $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'role-A' . random_int(1, 1000); + $job->key = 'role-A' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'fake'; diff --git a/tests/Unit/Support/Import/JobConfiguration/File/ConfigureUploadHandlerTest.php b/tests/Unit/Support/Import/JobConfiguration/File/ConfigureUploadHandlerTest.php index 51727b981d..caec067b68 100644 --- a/tests/Unit/Support/Import/JobConfiguration/File/ConfigureUploadHandlerTest.php +++ b/tests/Unit/Support/Import/JobConfiguration/File/ConfigureUploadHandlerTest.php @@ -43,7 +43,7 @@ class ConfigureUploadHandlerTest extends TestCase { $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'upload-B' . random_int(1, 1000); + $job->key = 'upload-B' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'fake'; @@ -92,7 +92,7 @@ class ConfigureUploadHandlerTest extends TestCase { $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'upload-B' . random_int(1, 1000); + $job->key = 'upload-B' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'fake'; @@ -140,7 +140,7 @@ class ConfigureUploadHandlerTest extends TestCase { $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'upload-A' . random_int(1, 1000); + $job->key = 'upload-A' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'fake'; diff --git a/tests/Unit/Support/Import/JobConfiguration/File/NewFileJobHandlerTest.php b/tests/Unit/Support/Import/JobConfiguration/File/NewFileJobHandlerTest.php index e81a5c752c..947c80a591 100644 --- a/tests/Unit/Support/Import/JobConfiguration/File/NewFileJobHandlerTest.php +++ b/tests/Unit/Support/Import/JobConfiguration/File/NewFileJobHandlerTest.php @@ -46,7 +46,7 @@ class NewFileJobHandlerTest extends TestCase { $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'newfile-A' . random_int(1, 1000); + $job->key = 'newfile-A' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'fake'; @@ -101,7 +101,7 @@ class NewFileJobHandlerTest extends TestCase { $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'newfile-A' . random_int(1, 1000); + $job->key = 'newfile-A' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'fake'; @@ -159,7 +159,7 @@ class NewFileJobHandlerTest extends TestCase { $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'newfile-A' . random_int(1, 1000); + $job->key = 'newfile-A' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'fake'; @@ -206,7 +206,7 @@ class NewFileJobHandlerTest extends TestCase { $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'newfile-x' . random_int(1, 1000); + $job->key = 'newfile-x' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'fake'; @@ -254,7 +254,7 @@ class NewFileJobHandlerTest extends TestCase { $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'newfile-x' . random_int(1, 1000); + $job->key = 'newfile-x' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'fake'; diff --git a/tests/Unit/Support/Import/JobConfiguration/Spectre/ChooseAccountsHandlerTest.php b/tests/Unit/Support/Import/JobConfiguration/Spectre/ChooseAccountsHandlerTest.php index 6defb45701..7e6089d9a9 100644 --- a/tests/Unit/Support/Import/JobConfiguration/Spectre/ChooseAccountsHandlerTest.php +++ b/tests/Unit/Support/Import/JobConfiguration/Spectre/ChooseAccountsHandlerTest.php @@ -54,7 +54,7 @@ class ChooseAccountsHandlerTest extends TestCase // fake job: $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'sca-A' . random_int(1, 1000); + $job->key = 'sca-A' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'spectre'; @@ -89,7 +89,7 @@ class ChooseAccountsHandlerTest extends TestCase // fake job: $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'sca-B' . random_int(1, 1000); + $job->key = 'sca-B' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'spectre'; @@ -128,7 +128,7 @@ class ChooseAccountsHandlerTest extends TestCase // fake job: $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'sca-c' . random_int(1, 1000); + $job->key = 'sca-c' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'spectre'; @@ -187,7 +187,7 @@ class ChooseAccountsHandlerTest extends TestCase // fake job: $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'sca-E' . random_int(1, 1000); + $job->key = 'sca-E' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'spectre'; @@ -246,7 +246,7 @@ class ChooseAccountsHandlerTest extends TestCase // fake job: $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'sca-D' . random_int(1, 1000); + $job->key = 'sca-D' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'spectre'; @@ -303,7 +303,7 @@ class ChooseAccountsHandlerTest extends TestCase // fake job: $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'sca-E' . random_int(1, 1000); + $job->key = 'sca-E' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'spectre'; @@ -433,7 +433,7 @@ class ChooseAccountsHandlerTest extends TestCase // fake job: $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'sca-F' . random_int(1, 1000); + $job->key = 'sca-F' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'spectre'; @@ -586,7 +586,7 @@ class ChooseAccountsHandlerTest extends TestCase // fake job: $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'sca-F' . random_int(1, 1000); + $job->key = 'sca-F' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'spectre'; diff --git a/tests/Unit/Support/Import/JobConfiguration/Spectre/ChooseLoginHandlerTest.php b/tests/Unit/Support/Import/JobConfiguration/Spectre/ChooseLoginHandlerTest.php index 7ecf6f9eb6..a565e7e6ca 100644 --- a/tests/Unit/Support/Import/JobConfiguration/Spectre/ChooseLoginHandlerTest.php +++ b/tests/Unit/Support/Import/JobConfiguration/Spectre/ChooseLoginHandlerTest.php @@ -51,7 +51,7 @@ class ChooseLoginHandlerTest extends TestCase { $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'slh-A' . random_int(1, 1000); + $job->key = 'slh-A' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'spectre'; @@ -74,7 +74,7 @@ class ChooseLoginHandlerTest extends TestCase { $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'slh-B' . random_int(1, 1000); + $job->key = 'slh-B' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'spectre'; @@ -98,7 +98,7 @@ class ChooseLoginHandlerTest extends TestCase $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'slh-C' . random_int(1, 1000); + $job->key = 'slh-C' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'spectre'; @@ -138,7 +138,7 @@ class ChooseLoginHandlerTest extends TestCase $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'slh-C' . random_int(1, 1000); + $job->key = 'slh-C' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'spectre'; @@ -256,7 +256,7 @@ class ChooseLoginHandlerTest extends TestCase $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'slh-C' . random_int(1, 1000); + $job->key = 'slh-C' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'spectre'; diff --git a/tests/Unit/Support/Import/JobConfiguration/Spectre/DoAuthenticateHandlerTest.php b/tests/Unit/Support/Import/JobConfiguration/Spectre/DoAuthenticateHandlerTest.php index 2ed672d401..66d9073ae4 100644 --- a/tests/Unit/Support/Import/JobConfiguration/Spectre/DoAuthenticateHandlerTest.php +++ b/tests/Unit/Support/Import/JobConfiguration/Spectre/DoAuthenticateHandlerTest.php @@ -51,7 +51,7 @@ class DoAuthenticateHandlerTest extends TestCase $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'sda-A' . random_int(1, 1000); + $job->key = 'sda-A' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'spectre'; diff --git a/tests/Unit/Support/Import/Routine/Bunq/StageImportDataHandlerTest.php b/tests/Unit/Support/Import/Routine/Bunq/StageImportDataHandlerTest.php index 5377832253..5537abf7bb 100644 --- a/tests/Unit/Support/Import/Routine/Bunq/StageImportDataHandlerTest.php +++ b/tests/Unit/Support/Import/Routine/Bunq/StageImportDataHandlerTest.php @@ -57,7 +57,7 @@ class StageImportDataHandlerTest extends TestCase { $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'sidh_bbunq_' . random_int(1, 1000); + $job->key = 'sidh_bbunq_' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'bunq'; @@ -107,7 +107,7 @@ class StageImportDataHandlerTest extends TestCase $payment = new BunqPayment($amount, $pointer, 'Some descr', null, null); $payment->setAmount($amount); $payment->setCounterpartyAlias($labelMonetaryAccount); - $payment->setDescription('Random description #' . random_int(1, 1000)); + $payment->setDescription('Random description #' . random_int(1, 10000)); $value = [$payment]; $list = new BunqResponsePaymentList($value, [], null); @@ -191,7 +191,7 @@ class StageImportDataHandlerTest extends TestCase { $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'sidA_bbunq_' . random_int(1, 1000); + $job->key = 'sidA_bbunq_' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'bunq'; @@ -253,7 +253,7 @@ class StageImportDataHandlerTest extends TestCase { $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'sidh_bbunq_' . random_int(1, 1000); + $job->key = 'sidh_bbunq_' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'bunq'; @@ -295,7 +295,7 @@ class StageImportDataHandlerTest extends TestCase $payment = new BunqPayment($amount, $pointer, 'Some descr', null, null); $payment->setAmount($amount); - $payment->setDescription('Some random thing #' . random_int(1, 1000)); + $payment->setDescription('Some random thing #' . random_int(1, 10000)); $payment->setCounterpartyAlias($labelMonetaryAccount); $value = [$payment]; $list = new BunqResponsePaymentList($value, [], null); @@ -377,7 +377,7 @@ class StageImportDataHandlerTest extends TestCase { $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'sidh_bbunq_' . random_int(1, 1000); + $job->key = 'sidh_bbunq_' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'bunq'; @@ -427,7 +427,7 @@ class StageImportDataHandlerTest extends TestCase $payment = new BunqPayment($amount, $pointer, 'Some descr', null, null); $payment->setAmount($amount); $payment->setCounterpartyAlias($labelMonetaryAccount); - $payment->setDescription('Random transfer #' . random_int(1, 1000)); + $payment->setDescription('Random transfer #' . random_int(1, 10000)); $value = [$payment]; $list = new BunqResponsePaymentList($value, [], null); diff --git a/tests/Unit/Support/Import/Routine/Bunq/StageNewHandlerTest.php b/tests/Unit/Support/Import/Routine/Bunq/StageNewHandlerTest.php index 46e26530f0..ccb76ea512 100644 --- a/tests/Unit/Support/Import/Routine/Bunq/StageNewHandlerTest.php +++ b/tests/Unit/Support/Import/Routine/Bunq/StageNewHandlerTest.php @@ -57,7 +57,7 @@ class StageNewHandlerTest extends TestCase { $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'snh_bunq_' . random_int(1, 1000); + $job->key = 'snh_bunq_' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'bunq'; @@ -143,7 +143,7 @@ class StageNewHandlerTest extends TestCase { $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'snha_bunq_' . random_int(1, 1000); + $job->key = 'snha_bunq_' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'bunq'; @@ -234,7 +234,7 @@ class StageNewHandlerTest extends TestCase { $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'snh_bbunq_' . random_int(1, 1000); + $job->key = 'snh_bbunq_' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'bunq'; diff --git a/tests/Unit/Support/Import/Routine/File/LineReaderTest.php b/tests/Unit/Support/Import/Routine/File/LineReaderTest.php index 1ca935f984..ae0eb7b245 100644 --- a/tests/Unit/Support/Import/Routine/File/LineReaderTest.php +++ b/tests/Unit/Support/Import/Routine/File/LineReaderTest.php @@ -45,7 +45,7 @@ class LineReaderTest extends TestCase { $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'linerA' . random_int(1, 1000); + $job->key = 'linerA' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'fake'; diff --git a/tests/Unit/Support/Import/Routine/File/MappingConvergerTest.php b/tests/Unit/Support/Import/Routine/File/MappingConvergerTest.php index e6a56968aa..22fd281170 100644 --- a/tests/Unit/Support/Import/Routine/File/MappingConvergerTest.php +++ b/tests/Unit/Support/Import/Routine/File/MappingConvergerTest.php @@ -120,7 +120,7 @@ class MappingConvergerTest extends TestCase $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'linerB' . random_int(1, 1000); + $job->key = 'linerB' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'fake'; diff --git a/tests/Unit/Support/Import/Routine/Spectre/StageAuthenticatedHandlerTest.php b/tests/Unit/Support/Import/Routine/Spectre/StageAuthenticatedHandlerTest.php index 99bc1e4a3b..63576001d7 100644 --- a/tests/Unit/Support/Import/Routine/Spectre/StageAuthenticatedHandlerTest.php +++ b/tests/Unit/Support/Import/Routine/Spectre/StageAuthenticatedHandlerTest.php @@ -112,7 +112,7 @@ class StageAuthenticatedHandlerTest extends TestCase $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'sa_a_' . random_int(1, 1000); + $job->key = 'sa_a_' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'spectre'; @@ -241,7 +241,7 @@ class StageAuthenticatedHandlerTest extends TestCase $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'sa_a_' . random_int(1, 1000); + $job->key = 'sa_a_' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'spectre'; @@ -370,7 +370,7 @@ class StageAuthenticatedHandlerTest extends TestCase $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'sa_a_' . random_int(1, 1000); + $job->key = 'sa_a_' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'spectre'; diff --git a/tests/Unit/Support/Import/Routine/Spectre/StageImportDataHandlerTest.php b/tests/Unit/Support/Import/Routine/Spectre/StageImportDataHandlerTest.php index a64cfcfb31..e620538173 100644 --- a/tests/Unit/Support/Import/Routine/Spectre/StageImportDataHandlerTest.php +++ b/tests/Unit/Support/Import/Routine/Spectre/StageImportDataHandlerTest.php @@ -113,7 +113,7 @@ class StageImportDataHandlerTest extends TestCase $revenue = $this->user()->accounts()->where('account_type_id', 5)->first(); $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'sid_a_' . random_int(1, 1000); + $job->key = 'sid_a_' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'spectre'; @@ -313,7 +313,7 @@ class StageImportDataHandlerTest extends TestCase $revenue = $this->user()->accounts()->where('account_type_id', 5)->first(); $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'sid_a_' . random_int(1, 1000); + $job->key = 'sid_a_' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'spectre'; @@ -510,7 +510,7 @@ class StageImportDataHandlerTest extends TestCase $revenue = $this->user()->accounts()->where('account_type_id', 5)->first(); $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'sid_a_' . random_int(1, 1000); + $job->key = 'sid_a_' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'spectre'; diff --git a/tests/Unit/Support/Import/Routine/Spectre/StageNewHandlerTest.php b/tests/Unit/Support/Import/Routine/Spectre/StageNewHandlerTest.php index 2aeb598c0f..e254ee89bd 100644 --- a/tests/Unit/Support/Import/Routine/Spectre/StageNewHandlerTest.php +++ b/tests/Unit/Support/Import/Routine/Spectre/StageNewHandlerTest.php @@ -59,7 +59,7 @@ class StageNewHandlerTest extends TestCase { $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'sn_a_' . random_int(1, 1000); + $job->key = 'sn_a_' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'spectre'; @@ -126,7 +126,7 @@ class StageNewHandlerTest extends TestCase { $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'sn_a_' . random_int(1, 1000); + $job->key = 'sn_a_' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'spectre'; @@ -179,7 +179,7 @@ class StageNewHandlerTest extends TestCase { $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'sn_a_' . random_int(1, 1000); + $job->key = 'sn_a_' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'spectre'; @@ -248,7 +248,7 @@ class StageNewHandlerTest extends TestCase { $job = new ImportJob; $job->user_id = $this->user()->id; - $job->key = 'sn_a_' . random_int(1, 1000); + $job->key = 'sn_a_' . random_int(1, 10000); $job->status = 'new'; $job->stage = 'new'; $job->provider = 'spectre'; diff --git a/tests/Unit/TransactionRules/Actions/AddTagTest.php b/tests/Unit/TransactionRules/Actions/AddTagTest.php index 2957cf143b..d208ee8131 100644 --- a/tests/Unit/TransactionRules/Actions/AddTagTest.php +++ b/tests/Unit/TransactionRules/Actions/AddTagTest.php @@ -59,7 +59,7 @@ class AddTagTest extends TestCase { $journal = TransactionJournal::inRandomOrder()->whereNull('deleted_at')->first(); $ruleAction = new RuleAction; - $ruleAction->action_value = 'TestTag-' . random_int(1, 1000); + $ruleAction->action_value = 'TestTag-' . random_int(1, 10000); $action = new AddTag($ruleAction); $result = $action->act($journal); $this->assertTrue($result); diff --git a/tests/Unit/TransactionRules/Actions/PrependDescriptionTest.php b/tests/Unit/TransactionRules/Actions/PrependDescriptionTest.php index 118873e738..606851f858 100644 --- a/tests/Unit/TransactionRules/Actions/PrependDescriptionTest.php +++ b/tests/Unit/TransactionRules/Actions/PrependDescriptionTest.php @@ -39,7 +39,7 @@ class PrependDescriptionTest extends TestCase public function testAct(): void { // get journal, give fixed description - $description = 'text' . random_int(1, 1000); + $description = 'text' . random_int(1, 10000); $prepend = 'prepend' . random_int(1, 1234); $journal = TransactionJournal::inRandomOrder()->whereNull('deleted_at')->first(); $journal->description = $description; diff --git a/tests/Unit/TransactionRules/Actions/SetDescriptionTest.php b/tests/Unit/TransactionRules/Actions/SetDescriptionTest.php index fc6691c67d..c43fa41e7b 100644 --- a/tests/Unit/TransactionRules/Actions/SetDescriptionTest.php +++ b/tests/Unit/TransactionRules/Actions/SetDescriptionTest.php @@ -39,7 +39,7 @@ class SetDescriptionTest extends TestCase public function testAct(): void { // get journal, give fixed description - $description = 'text' . random_int(1, 1000); + $description = 'text' . random_int(1, 10000); $newDescription = 'new description' . random_int(1, 1234); $journal = TransactionJournal::inRandomOrder()->whereNull('deleted_at')->first(); $journal->description = $description; diff --git a/tests/Unit/TransactionRules/Actions/SetDestinationAccountTest.php b/tests/Unit/TransactionRules/Actions/SetDestinationAccountTest.php index 0cd9b5594e..96d59797da 100644 --- a/tests/Unit/TransactionRules/Actions/SetDestinationAccountTest.php +++ b/tests/Unit/TransactionRules/Actions/SetDestinationAccountTest.php @@ -103,7 +103,7 @@ class SetDestinationAccountTest extends TestCase // fire the action: $ruleAction = new RuleAction; - $ruleAction->action_value = 'Not existing asset account #' . random_int(1, 1000); + $ruleAction->action_value = 'Not existing asset account #' . random_int(1, 10000); $action = new SetDestinationAccount($ruleAction); $result = $action->act($journal); $this->assertFalse($result); @@ -134,7 +134,7 @@ class SetDestinationAccountTest extends TestCase // fire the action: $ruleAction = new RuleAction; - $ruleAction->action_value = 'Not existing expense account #' . random_int(1, 1000); + $ruleAction->action_value = 'Not existing expense account #' . random_int(1, 10000); $action = new SetDestinationAccount($ruleAction); $result = $action->act($journal); @@ -202,7 +202,7 @@ class SetDestinationAccountTest extends TestCase // fire the action: $ruleAction = new RuleAction; - $ruleAction->action_value = 'Some new asset ' . random_int(1, 1000); + $ruleAction->action_value = 'Some new asset ' . random_int(1, 10000); $action = new SetDestinationAccount($ruleAction); $result = $action->act($journal); $this->assertFalse($result); diff --git a/tests/Unit/TransactionRules/Actions/SetSourceAccountTest.php b/tests/Unit/TransactionRules/Actions/SetSourceAccountTest.php index 4e5fbf69d5..b56271d315 100644 --- a/tests/Unit/TransactionRules/Actions/SetSourceAccountTest.php +++ b/tests/Unit/TransactionRules/Actions/SetSourceAccountTest.php @@ -104,7 +104,7 @@ class SetSourceAccountTest extends TestCase // fire the action: $ruleAction = new RuleAction; - $ruleAction->action_value = 'Some new revenue #' . random_int(1, 1000); + $ruleAction->action_value = 'Some new revenue #' . random_int(1, 10000); $action = new SetSourceAccount($ruleAction); $result = $action->act($journal); $this->assertTrue($result); @@ -173,7 +173,7 @@ class SetSourceAccountTest extends TestCase // fire the action: $ruleAction = new RuleAction; - $ruleAction->action_value = 'Some new account #' . random_int(1, 1000); + $ruleAction->action_value = 'Some new account #' . random_int(1, 10000); $action = new SetSourceAccount($ruleAction); $result = $action->act($journal); $this->assertFalse($result); @@ -196,7 +196,7 @@ class SetSourceAccountTest extends TestCase $accountRepos->shouldReceive('setUser'); // fire the action: $ruleAction = new RuleAction; - $ruleAction->action_value = 'Some new asset ' . random_int(1, 1000); + $ruleAction->action_value = 'Some new asset ' . random_int(1, 10000); $action = new SetSourceAccount($ruleAction); $result = $action->act($journal); $this->assertFalse($result); diff --git a/tests/Unit/Transformers/AccountTransformerTest.php b/tests/Unit/Transformers/AccountTransformerTest.php index 4e7bd534d9..2ceb1039ca 100644 --- a/tests/Unit/Transformers/AccountTransformerTest.php +++ b/tests/Unit/Transformers/AccountTransformerTest.php @@ -142,7 +142,7 @@ class AccountTransformerTest extends TestCase 'noteable_id' => $account->id, 'noteable_type' => Account::class, 'title' => null, - 'text' => 'I am a note #' . random_int(1, 1000), + 'text' => 'I am a note #' . random_int(1, 10000), ] ); @@ -233,7 +233,7 @@ class AccountTransformerTest extends TestCase 'noteable_id' => $account->id, 'noteable_type' => Account::class, 'title' => null, - 'text' => 'I am a note #' . random_int(1, 1000), + 'text' => 'I am a note #' . random_int(1, 10000), ] ); @@ -421,7 +421,7 @@ class AccountTransformerTest extends TestCase 'noteable_id' => $account->id, 'noteable_type' => Account::class, 'title' => null, - 'text' => 'I am a note #' . random_int(1, 1000), + 'text' => 'I am a note #' . random_int(1, 10000), ] ); diff --git a/tests/Unit/Transformers/TagTransformerTest.php b/tests/Unit/Transformers/TagTransformerTest.php index de3e80cb64..c5bbcdb3cf 100644 --- a/tests/Unit/Transformers/TagTransformerTest.php +++ b/tests/Unit/Transformers/TagTransformerTest.php @@ -44,7 +44,7 @@ class TagTransformerTest extends TestCase $tag = Tag::create( [ 'user_id' => $this->user()->id, - 'tag' => 'Some tag ' . random_int(1, 1000), + 'tag' => 'Some tag ' . random_int(1, 10000), 'tagMode' => 'nothing', 'date' => '2018-01-01', 'description' => 'Some tag', diff --git a/tests/Unit/Transformers/TransactionTransformerTest.php b/tests/Unit/Transformers/TransactionTransformerTest.php index a75ddcdce1..4ffaeff0e2 100644 --- a/tests/Unit/Transformers/TransactionTransformerTest.php +++ b/tests/Unit/Transformers/TransactionTransformerTest.php @@ -280,7 +280,7 @@ class TransactionTransformerTest extends TestCase $budget = Budget::create( [ 'user_id' => $this->user()->id, - 'name' => 'Random budget #' . random_int(1, 1000), + 'name' => 'Random budget #' . random_int(1, 10000), 'active' => 1, ] ); @@ -464,7 +464,7 @@ class TransactionTransformerTest extends TestCase $budget = Budget::create( [ 'user_id' => $this->user()->id, - 'name' => 'Random budget #' . random_int(1, 1000), + 'name' => 'Random budget #' . random_int(1, 10000), 'active' => 1, ] ); @@ -566,7 +566,7 @@ class TransactionTransformerTest extends TestCase $category = Category::create( [ 'user_id' => $this->user()->id, - 'name' => 'Random category #' . random_int(1, 1000), + 'name' => 'Random category #' . random_int(1, 10000), 'active' => 1, ] ); @@ -1024,7 +1024,7 @@ class TransactionTransformerTest extends TestCase $budget = Budget::create( [ 'user_id' => $this->user()->id, - 'name' => 'Random budget #' . random_int(1, 1000), + 'name' => 'Random budget #' . random_int(1, 10000), 'active' => 1, ] ); @@ -1128,7 +1128,7 @@ class TransactionTransformerTest extends TestCase $category = Category::create( [ 'user_id' => $this->user()->id, - 'name' => 'Random category #' . random_int(1, 1000), + 'name' => 'Random category #' . random_int(1, 10000), 'active' => 1, ] );