mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-05-05 13:43:36 +00:00
Improve test coverage.
This commit is contained in:
@@ -60,7 +60,7 @@ class ChooseAccountsHandlerTest extends TestCase
|
||||
{
|
||||
$job = new ImportJob;
|
||||
$job->user_id = $this->user()->id;
|
||||
$job->key = 'caha' . random_int(1, 10000);
|
||||
$job->key = 'caha' . $this->randomInt();
|
||||
$job->status = 'new';
|
||||
$job->stage = 'new';
|
||||
$job->provider = 'bunq';
|
||||
@@ -91,7 +91,7 @@ class ChooseAccountsHandlerTest extends TestCase
|
||||
{
|
||||
$job = new ImportJob;
|
||||
$job->user_id = $this->user()->id;
|
||||
$job->key = 'cahb' . random_int(1, 10000);
|
||||
$job->key = 'cahb' . $this->randomInt();
|
||||
$job->status = 'new';
|
||||
$job->stage = 'new';
|
||||
$job->provider = 'bunq';
|
||||
@@ -124,7 +124,7 @@ class ChooseAccountsHandlerTest extends TestCase
|
||||
{
|
||||
$job = new ImportJob;
|
||||
$job->user_id = $this->user()->id;
|
||||
$job->key = 'cahc' . random_int(1, 10000);
|
||||
$job->key = 'cahc' . $this->randomInt();
|
||||
$job->status = 'new';
|
||||
$job->stage = 'new';
|
||||
$job->provider = 'bunq';
|
||||
@@ -179,7 +179,7 @@ class ChooseAccountsHandlerTest extends TestCase
|
||||
{
|
||||
$job = new ImportJob;
|
||||
$job->user_id = $this->user()->id;
|
||||
$job->key = 'cahd' . random_int(1, 10000);
|
||||
$job->key = 'cahd' . $this->randomInt();
|
||||
$job->status = 'new';
|
||||
$job->stage = 'new';
|
||||
$job->provider = 'bunq';
|
||||
@@ -234,7 +234,7 @@ class ChooseAccountsHandlerTest extends TestCase
|
||||
{
|
||||
$job = new ImportJob;
|
||||
$job->user_id = $this->user()->id;
|
||||
$job->key = 'cahe' . random_int(1, 10000);
|
||||
$job->key = 'cahe' . $this->randomInt();
|
||||
$job->status = 'new';
|
||||
$job->stage = 'new';
|
||||
$job->provider = 'bunq';
|
||||
@@ -289,7 +289,7 @@ class ChooseAccountsHandlerTest extends TestCase
|
||||
{
|
||||
$job = new ImportJob;
|
||||
$job->user_id = $this->user()->id;
|
||||
$job->key = 'cahf' . random_int(1, 10000);
|
||||
$job->key = 'cahf' . $this->randomInt();
|
||||
$job->status = 'new';
|
||||
$job->stage = 'new';
|
||||
$job->provider = 'bunq';
|
||||
@@ -335,7 +335,7 @@ class ChooseAccountsHandlerTest extends TestCase
|
||||
{
|
||||
$job = new ImportJob;
|
||||
$job->user_id = $this->user()->id;
|
||||
$job->key = 'cahg' . random_int(1, 10000);
|
||||
$job->key = 'cahg' . $this->randomInt();
|
||||
$job->status = 'new';
|
||||
$job->stage = 'new';
|
||||
$job->provider = 'bunq';
|
||||
@@ -398,7 +398,7 @@ class ChooseAccountsHandlerTest extends TestCase
|
||||
{
|
||||
$job = new ImportJob;
|
||||
$job->user_id = $this->user()->id;
|
||||
$job->key = 'cahg' . random_int(1, 10000);
|
||||
$job->key = 'cahg' . $this->randomInt();
|
||||
$job->status = 'new';
|
||||
$job->stage = 'new';
|
||||
$job->provider = 'bunq';
|
||||
|
||||
@@ -51,7 +51,7 @@ class NewBunqJobHandlerTest extends TestCase
|
||||
{
|
||||
$job = new ImportJob;
|
||||
$job->user_id = $this->user()->id;
|
||||
$job->key = 'cXha' . random_int(1, 10000);
|
||||
$job->key = 'cXha' . $this->randomInt();
|
||||
$job->status = 'new';
|
||||
$job->stage = 'new';
|
||||
$job->provider = 'bunq';
|
||||
|
||||
@@ -63,7 +63,7 @@ class ConfigureMappingHandlerTest extends TestCase
|
||||
$importRepos->shouldReceive('setUser')->once();
|
||||
$job = new ImportJob;
|
||||
$job->user_id = $this->user()->id;
|
||||
$job->key = 'mapG' . random_int(1, 10000);
|
||||
$job->key = 'mapG' . $this->randomInt();
|
||||
$job->status = 'new';
|
||||
$job->stage = 'new';
|
||||
$job->provider = 'fake';
|
||||
@@ -131,7 +131,7 @@ class ConfigureMappingHandlerTest extends TestCase
|
||||
|
||||
$job = new ImportJob;
|
||||
$job->user_id = $this->user()->id;
|
||||
$job->key = 'mapA' . random_int(1, 10000);
|
||||
$job->key = 'mapA' . $this->randomInt();
|
||||
$job->status = 'new';
|
||||
$job->stage = 'new';
|
||||
$job->provider = 'fake';
|
||||
@@ -165,7 +165,7 @@ class ConfigureMappingHandlerTest extends TestCase
|
||||
$importRepos->shouldReceive('setUser')->once();
|
||||
$job = new ImportJob;
|
||||
$job->user_id = $this->user()->id;
|
||||
$job->key = 'mapE' . random_int(1, 10000);
|
||||
$job->key = 'mapE' . $this->randomInt();
|
||||
$job->status = 'new';
|
||||
$job->stage = 'new';
|
||||
$job->provider = 'fake';
|
||||
@@ -230,7 +230,7 @@ class ConfigureMappingHandlerTest extends TestCase
|
||||
$importRepos->shouldReceive('setUser')->once();
|
||||
$job = new ImportJob;
|
||||
$job->user_id = $this->user()->id;
|
||||
$job->key = 'mapC' . random_int(1, 10000);
|
||||
$job->key = 'mapC' . $this->randomInt();
|
||||
$job->status = 'new';
|
||||
$job->stage = 'new';
|
||||
$job->provider = 'fake';
|
||||
@@ -260,7 +260,7 @@ class ConfigureMappingHandlerTest extends TestCase
|
||||
|
||||
$job = new ImportJob;
|
||||
$job->user_id = $this->user()->id;
|
||||
$job->key = 'mapH' . random_int(1, 10000);
|
||||
$job->key = 'mapH' . $this->randomInt();
|
||||
$job->status = 'new';
|
||||
$job->stage = 'new';
|
||||
$job->provider = 'fake';
|
||||
@@ -343,7 +343,7 @@ class ConfigureMappingHandlerTest extends TestCase
|
||||
$importRepos->shouldReceive('setUser')->once();
|
||||
$job = new ImportJob;
|
||||
$job->user_id = $this->user()->id;
|
||||
$job->key = 'mapD' . random_int(1, 10000);
|
||||
$job->key = 'mapD' . $this->randomInt();
|
||||
$job->status = 'new';
|
||||
$job->stage = 'new';
|
||||
$job->provider = 'fake';
|
||||
@@ -372,7 +372,7 @@ class ConfigureMappingHandlerTest extends TestCase
|
||||
|
||||
$job = new ImportJob;
|
||||
$job->user_id = $this->user()->id;
|
||||
$job->key = 'mapF' . random_int(1, 10000);
|
||||
$job->key = 'mapF' . $this->randomInt();
|
||||
$job->status = 'new';
|
||||
$job->stage = 'new';
|
||||
$job->provider = 'fake';
|
||||
@@ -461,7 +461,7 @@ class ConfigureMappingHandlerTest extends TestCase
|
||||
|
||||
$job = new ImportJob;
|
||||
$job->user_id = $this->user()->id;
|
||||
$job->key = 'mapB' . random_int(1, 10000);
|
||||
$job->key = 'mapB' . $this->randomInt();
|
||||
$job->status = 'new';
|
||||
$job->stage = 'new';
|
||||
$job->provider = 'fake';
|
||||
@@ -491,7 +491,7 @@ class ConfigureMappingHandlerTest extends TestCase
|
||||
$importRepos->shouldReceive('setUser')->once();
|
||||
$job = new ImportJob;
|
||||
$job->user_id = $this->user()->id;
|
||||
$job->key = 'mapB' . random_int(1, 10000);
|
||||
$job->key = 'mapB' . $this->randomInt();
|
||||
$job->status = 'new';
|
||||
$job->stage = 'new';
|
||||
$job->provider = 'fake';
|
||||
|
||||
@@ -134,7 +134,7 @@ class ConfigureRolesHandlerTest extends TestCase
|
||||
|
||||
$job = new ImportJob;
|
||||
$job->user_id = $this->user()->id;
|
||||
$job->key = 'role-B' . random_int(1, 10000);
|
||||
$job->key = 'role-B' . $this->randomInt();
|
||||
$job->status = 'new';
|
||||
$job->stage = 'new';
|
||||
$job->provider = 'fake';
|
||||
@@ -215,7 +215,7 @@ class ConfigureRolesHandlerTest extends TestCase
|
||||
|
||||
$job = new ImportJob;
|
||||
$job->user_id = $this->user()->id;
|
||||
$job->key = 'role-x' . random_int(1, 10000);
|
||||
$job->key = 'role-x' . $this->randomInt();
|
||||
$job->status = 'new';
|
||||
$job->stage = 'new';
|
||||
$job->provider = 'fake';
|
||||
@@ -297,7 +297,7 @@ class ConfigureRolesHandlerTest extends TestCase
|
||||
|
||||
$job = new ImportJob;
|
||||
$job->user_id = $this->user()->id;
|
||||
$job->key = 'role-x' . random_int(1, 10000);
|
||||
$job->key = 'role-x' . $this->randomInt();
|
||||
$job->status = 'new';
|
||||
$job->stage = 'new';
|
||||
$job->provider = 'fake';
|
||||
@@ -368,7 +368,7 @@ class ConfigureRolesHandlerTest extends TestCase
|
||||
|
||||
$job = new ImportJob;
|
||||
$job->user_id = $this->user()->id;
|
||||
$job->key = 'role-x' . random_int(1, 10000);
|
||||
$job->key = 'role-x' . $this->randomInt();
|
||||
$job->status = 'new';
|
||||
$job->stage = 'new';
|
||||
$job->provider = 'fake';
|
||||
@@ -543,7 +543,7 @@ class ConfigureRolesHandlerTest extends TestCase
|
||||
|
||||
$job = new ImportJob;
|
||||
$job->user_id = $this->user()->id;
|
||||
$job->key = 'role-A' . random_int(1, 10000);
|
||||
$job->key = 'role-A' . $this->randomInt();
|
||||
$job->status = 'new';
|
||||
$job->stage = 'new';
|
||||
$job->provider = 'fake';
|
||||
|
||||
@@ -53,7 +53,7 @@ class ConfigureUploadHandlerTest extends TestCase
|
||||
{
|
||||
$job = new ImportJob;
|
||||
$job->user_id = $this->user()->id;
|
||||
$job->key = 'upload-B' . random_int(1, 10000);
|
||||
$job->key = 'upload-B' . $this->randomInt();
|
||||
$job->status = 'new';
|
||||
$job->stage = 'new';
|
||||
$job->provider = 'fake';
|
||||
@@ -102,7 +102,7 @@ class ConfigureUploadHandlerTest extends TestCase
|
||||
{
|
||||
$job = new ImportJob;
|
||||
$job->user_id = $this->user()->id;
|
||||
$job->key = 'upload-B' . random_int(1, 10000);
|
||||
$job->key = 'upload-B' . $this->randomInt();
|
||||
$job->status = 'new';
|
||||
$job->stage = 'new';
|
||||
$job->provider = 'fake';
|
||||
@@ -150,7 +150,7 @@ class ConfigureUploadHandlerTest extends TestCase
|
||||
{
|
||||
$job = new ImportJob;
|
||||
$job->user_id = $this->user()->id;
|
||||
$job->key = 'upload-A' . random_int(1, 10000);
|
||||
$job->key = 'upload-A' . $this->randomInt();
|
||||
$job->status = 'new';
|
||||
$job->stage = 'new';
|
||||
$job->provider = 'fake';
|
||||
|
||||
@@ -56,7 +56,7 @@ class NewFileJobHandlerTest extends TestCase
|
||||
{
|
||||
$job = new ImportJob;
|
||||
$job->user_id = $this->user()->id;
|
||||
$job->key = 'newfile-A' . random_int(1, 10000);
|
||||
$job->key = 'newfile-A' . $this->randomInt();
|
||||
$job->status = 'new';
|
||||
$job->stage = 'new';
|
||||
$job->provider = 'fake';
|
||||
@@ -111,7 +111,7 @@ class NewFileJobHandlerTest extends TestCase
|
||||
{
|
||||
$job = new ImportJob;
|
||||
$job->user_id = $this->user()->id;
|
||||
$job->key = 'newfile-A' . random_int(1, 10000);
|
||||
$job->key = 'newfile-A' . $this->randomInt();
|
||||
$job->status = 'new';
|
||||
$job->stage = 'new';
|
||||
$job->provider = 'fake';
|
||||
@@ -169,7 +169,7 @@ class NewFileJobHandlerTest extends TestCase
|
||||
{
|
||||
$job = new ImportJob;
|
||||
$job->user_id = $this->user()->id;
|
||||
$job->key = 'newfile-A' . random_int(1, 10000);
|
||||
$job->key = 'newfile-A' . $this->randomInt();
|
||||
$job->status = 'new';
|
||||
$job->stage = 'new';
|
||||
$job->provider = 'fake';
|
||||
@@ -216,7 +216,7 @@ class NewFileJobHandlerTest extends TestCase
|
||||
{
|
||||
$job = new ImportJob;
|
||||
$job->user_id = $this->user()->id;
|
||||
$job->key = 'newfile-x' . random_int(1, 10000);
|
||||
$job->key = 'newfile-x' . $this->randomInt();
|
||||
$job->status = 'new';
|
||||
$job->stage = 'new';
|
||||
$job->provider = 'fake';
|
||||
@@ -264,7 +264,7 @@ class NewFileJobHandlerTest extends TestCase
|
||||
{
|
||||
$job = new ImportJob;
|
||||
$job->user_id = $this->user()->id;
|
||||
$job->key = 'newfile-x' . random_int(1, 10000);
|
||||
$job->key = 'newfile-x' . $this->randomInt();
|
||||
$job->status = 'new';
|
||||
$job->stage = 'new';
|
||||
$job->provider = 'fake';
|
||||
|
||||
@@ -64,7 +64,7 @@ class ChooseAccountsHandlerTest extends TestCase
|
||||
// fake job:
|
||||
$job = new ImportJob;
|
||||
$job->user_id = $this->user()->id;
|
||||
$job->key = 'sca-A' . random_int(1, 10000);
|
||||
$job->key = 'sca-A' . $this->randomInt();
|
||||
$job->status = 'new';
|
||||
$job->stage = 'new';
|
||||
$job->provider = 'spectre';
|
||||
@@ -99,7 +99,7 @@ class ChooseAccountsHandlerTest extends TestCase
|
||||
// fake job:
|
||||
$job = new ImportJob;
|
||||
$job->user_id = $this->user()->id;
|
||||
$job->key = 'sca-B' . random_int(1, 10000);
|
||||
$job->key = 'sca-B' . $this->randomInt();
|
||||
$job->status = 'new';
|
||||
$job->stage = 'new';
|
||||
$job->provider = 'spectre';
|
||||
@@ -138,7 +138,7 @@ class ChooseAccountsHandlerTest extends TestCase
|
||||
// fake job:
|
||||
$job = new ImportJob;
|
||||
$job->user_id = $this->user()->id;
|
||||
$job->key = 'sca-c' . random_int(1, 10000);
|
||||
$job->key = 'sca-c' . $this->randomInt();
|
||||
$job->status = 'new';
|
||||
$job->stage = 'new';
|
||||
$job->provider = 'spectre';
|
||||
@@ -197,7 +197,7 @@ class ChooseAccountsHandlerTest extends TestCase
|
||||
// fake job:
|
||||
$job = new ImportJob;
|
||||
$job->user_id = $this->user()->id;
|
||||
$job->key = 'sca-E' . random_int(1, 10000);
|
||||
$job->key = 'sca-E' . $this->randomInt();
|
||||
$job->status = 'new';
|
||||
$job->stage = 'new';
|
||||
$job->provider = 'spectre';
|
||||
@@ -256,7 +256,7 @@ class ChooseAccountsHandlerTest extends TestCase
|
||||
// fake job:
|
||||
$job = new ImportJob;
|
||||
$job->user_id = $this->user()->id;
|
||||
$job->key = 'sca-D' . random_int(1, 10000);
|
||||
$job->key = 'sca-D' . $this->randomInt();
|
||||
$job->status = 'new';
|
||||
$job->stage = 'new';
|
||||
$job->provider = 'spectre';
|
||||
@@ -313,7 +313,7 @@ class ChooseAccountsHandlerTest extends TestCase
|
||||
// fake job:
|
||||
$job = new ImportJob;
|
||||
$job->user_id = $this->user()->id;
|
||||
$job->key = 'sca-E' . random_int(1, 10000);
|
||||
$job->key = 'sca-E' . $this->randomInt();
|
||||
$job->status = 'new';
|
||||
$job->stage = 'new';
|
||||
$job->provider = 'spectre';
|
||||
@@ -443,7 +443,7 @@ class ChooseAccountsHandlerTest extends TestCase
|
||||
// fake job:
|
||||
$job = new ImportJob;
|
||||
$job->user_id = $this->user()->id;
|
||||
$job->key = 'sca-F' . random_int(1, 10000);
|
||||
$job->key = 'sca-F' . $this->randomInt();
|
||||
$job->status = 'new';
|
||||
$job->stage = 'new';
|
||||
$job->provider = 'spectre';
|
||||
@@ -596,7 +596,7 @@ class ChooseAccountsHandlerTest extends TestCase
|
||||
// fake job:
|
||||
$job = new ImportJob;
|
||||
$job->user_id = $this->user()->id;
|
||||
$job->key = 'sca-F' . random_int(1, 10000);
|
||||
$job->key = 'sca-F' . $this->randomInt();
|
||||
$job->status = 'new';
|
||||
$job->stage = 'new';
|
||||
$job->provider = 'spectre';
|
||||
|
||||
@@ -62,7 +62,7 @@ class ChooseLoginHandlerTest extends TestCase
|
||||
|
||||
$job = new ImportJob;
|
||||
$job->user_id = $this->user()->id;
|
||||
$job->key = 'slh-A' . random_int(1, 10000);
|
||||
$job->key = 'slh-A' . $this->randomInt();
|
||||
$job->status = 'new';
|
||||
$job->stage = 'new';
|
||||
$job->provider = 'spectre';
|
||||
@@ -85,7 +85,7 @@ class ChooseLoginHandlerTest extends TestCase
|
||||
{
|
||||
$job = new ImportJob;
|
||||
$job->user_id = $this->user()->id;
|
||||
$job->key = 'slh-B' . random_int(1, 10000);
|
||||
$job->key = 'slh-B' . $this->randomInt();
|
||||
$job->status = 'new';
|
||||
$job->stage = 'new';
|
||||
$job->provider = 'spectre';
|
||||
@@ -109,7 +109,7 @@ class ChooseLoginHandlerTest extends TestCase
|
||||
|
||||
$job = new ImportJob;
|
||||
$job->user_id = $this->user()->id;
|
||||
$job->key = 'slh-C' . random_int(1, 10000);
|
||||
$job->key = 'slh-C' . $this->randomInt();
|
||||
$job->status = 'new';
|
||||
$job->stage = 'new';
|
||||
$job->provider = 'spectre';
|
||||
@@ -149,7 +149,7 @@ class ChooseLoginHandlerTest extends TestCase
|
||||
|
||||
$job = new ImportJob;
|
||||
$job->user_id = $this->user()->id;
|
||||
$job->key = 'slh-C' . random_int(1, 10000);
|
||||
$job->key = 'slh-C' . $this->randomInt();
|
||||
$job->status = 'new';
|
||||
$job->stage = 'new';
|
||||
$job->provider = 'spectre';
|
||||
@@ -269,7 +269,7 @@ class ChooseLoginHandlerTest extends TestCase
|
||||
|
||||
$job = new ImportJob;
|
||||
$job->user_id = $this->user()->id;
|
||||
$job->key = 'slh-C' . random_int(1, 10000);
|
||||
$job->key = 'slh-C' . $this->randomInt();
|
||||
$job->status = 'new';
|
||||
$job->stage = 'new';
|
||||
$job->provider = 'spectre';
|
||||
|
||||
@@ -62,7 +62,7 @@ class DoAuthenticateHandlerTest extends TestCase
|
||||
|
||||
$job = new ImportJob;
|
||||
$job->user_id = $this->user()->id;
|
||||
$job->key = 'sda-A' . random_int(1, 10000);
|
||||
$job->key = 'sda-A' . $this->randomInt();
|
||||
$job->status = 'new';
|
||||
$job->stage = 'new';
|
||||
$job->provider = 'spectre';
|
||||
|
||||
Reference in New Issue
Block a user