mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Prep for bunq and spectre import.
This commit is contained in:
parent
470b3e0973
commit
5a093b58d8
@ -95,4 +95,5 @@ DEMO_PASSWORD=
|
||||
IS_DOCKER=true
|
||||
IS_SANDSTORM=false
|
||||
IS_HEROKU=false
|
||||
BUNQ_USE_SANDBOX=false
|
||||
TZ=${TZ}
|
||||
|
@ -98,4 +98,5 @@ DEMO_USERNAME=
|
||||
DEMO_PASSWORD=
|
||||
IS_DOCKER=false
|
||||
IS_SANDSTORM=false
|
||||
BUNQ_USE_SANDBOX=false
|
||||
IS_HEROKU=false
|
||||
|
@ -98,4 +98,5 @@ DEMO_USERNAME=
|
||||
DEMO_PASSWORD=
|
||||
IS_DOCKER=false
|
||||
IS_SANDSTORM=false
|
||||
BUNQ_USE_SANDBOX=false
|
||||
IS_HEROKU=true
|
||||
|
@ -98,4 +98,5 @@ DEMO_USERNAME=
|
||||
DEMO_PASSWORD=
|
||||
IS_DOCKER=false
|
||||
IS_SANDSTORM=true
|
||||
BUNQ_USE_SANDBOX=false
|
||||
IS_HEROKU=false
|
||||
|
@ -94,4 +94,5 @@ DEMO_USERNAME=
|
||||
DEMO_PASSWORD=
|
||||
IS_DOCKER=false
|
||||
IS_SANDSTORM=false
|
||||
BUNQ_USE_SANDBOX=false
|
||||
IS_HEROKU=false
|
||||
|
@ -30,8 +30,6 @@ use Log;
|
||||
use Preferences;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @codeCoverageIgnore
|
||||
* This class contains all the routines necessary to connect to Spectre.
|
||||
*/
|
||||
class SpectrePrerequisites implements PrerequisitesInterface
|
||||
@ -196,7 +194,7 @@ class SpectrePrerequisites implements PrerequisitesInterface
|
||||
*/
|
||||
public function getView(): string
|
||||
{
|
||||
return '';
|
||||
return 'import.spectre.prerequisites';
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -25,6 +25,7 @@ declare(strict_types=1);
|
||||
use FireflyIII\Import\JobConfiguration\FakeJobConfiguration;
|
||||
use FireflyIII\Import\JobConfiguration\FileJobConfiguration;
|
||||
use FireflyIII\Import\Prerequisites\FakePrerequisites;
|
||||
use FireflyIII\Import\Prerequisites\SpectrePrerequisites;
|
||||
use FireflyIII\Import\Routine\FakeRoutine;
|
||||
use FireflyIII\Import\Routine\FileRoutine;
|
||||
use FireflyIII\Support\Import\Routine\File\CSVProcessor;
|
||||
@ -60,6 +61,7 @@ return [
|
||||
'quovo' => true,
|
||||
'yodlee' => true,
|
||||
],
|
||||
// some providers have pre-requisites.
|
||||
'has_prereq' => [
|
||||
'fake' => true,
|
||||
'file' => false,
|
||||
@ -69,15 +71,17 @@ return [
|
||||
'quovo' => true,
|
||||
'yodlee' => true,
|
||||
],
|
||||
// if so, there must be a class to handle them.
|
||||
'prerequisites' => [
|
||||
'fake' => FakePrerequisites::class,
|
||||
'file' => false,
|
||||
'bunq' => false,
|
||||
'bunq' => SpectrePrerequisites::class,
|
||||
'spectre' => false,
|
||||
'plaid' => false,
|
||||
'quovo' => false,
|
||||
'yodlee' => false,
|
||||
],
|
||||
// some providers may have extra configuration per job.
|
||||
'has_config' => [
|
||||
'fake' => true,
|
||||
'file' => true,
|
||||
@ -87,6 +91,7 @@ return [
|
||||
'quovo' => true,
|
||||
'yodlee' => true,
|
||||
],
|
||||
// if so, this is the class that handles it.
|
||||
'configuration' => [
|
||||
'fake' => FakeJobConfiguration::class,
|
||||
'file' => FileJobConfiguration::class,
|
||||
@ -96,6 +101,7 @@ return [
|
||||
'quovo' => false,
|
||||
'yodlee' => false,
|
||||
],
|
||||
// this is the routine that runs the actual import.
|
||||
'routine' => [
|
||||
'fake' => FakeRoutine::class,
|
||||
'file' => FileRoutine::class,
|
||||
@ -128,5 +134,8 @@ return [
|
||||
'spectre' => [
|
||||
'server' => 'www.saltedge.com',
|
||||
],
|
||||
'plaid' => [],
|
||||
'quovo' => [],
|
||||
'yodlee' => [],
|
||||
],
|
||||
];
|
||||
|
@ -71,6 +71,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{#
|
||||
<div class="col-lg-4 col-md-12 col-sm-12 col-xs-12">
|
||||
<div class="box box-default">
|
||||
<div class="box-header with-border">
|
||||
@ -90,6 +91,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
#}
|
||||
</div>
|
||||
<!--
|
||||
<div class="row">
|
||||
|
@ -64,9 +64,10 @@ class IndexControllerTest extends TestCase
|
||||
$importJob->key = 'fake_job_1';
|
||||
|
||||
// mock call:
|
||||
$userRepository->shouldReceive('hasRole')->withArgs([Mockery::any(),'demo'])->andReturn(true)->once();
|
||||
$repository->shouldReceive('create')->withArgs(['fake'])->andReturn($importJob);
|
||||
$fakePrerequisites->shouldReceive('isComplete')->once()->andReturn(false);
|
||||
$fakePrerequisites->shouldReceive('setUser')->once();
|
||||
$fakePrerequisites->shouldReceive('isComplete')->twice()->andReturn(false);
|
||||
$fakePrerequisites->shouldReceive('setUser')->twice();
|
||||
|
||||
|
||||
$this->be($this->user());
|
||||
@ -93,9 +94,10 @@ class IndexControllerTest extends TestCase
|
||||
$importJob->key = 'fake_job_2';
|
||||
|
||||
// mock call:
|
||||
$userRepository->shouldReceive('hasRole')->withArgs([Mockery::any(),'demo'])->andReturn(true)->once();
|
||||
$repository->shouldReceive('create')->withArgs(['fake'])->andReturn($importJob);
|
||||
$fakePrerequisites->shouldReceive('isComplete')->once()->andReturn(true);
|
||||
$fakePrerequisites->shouldReceive('setUser')->once();
|
||||
$fakePrerequisites->shouldReceive('isComplete')->twice()->andReturn(true);
|
||||
$fakePrerequisites->shouldReceive('setUser')->twice();
|
||||
$repository->shouldReceive('setStatus')->withArgs([Mockery::any(), 'has_prereq'])->andReturn($importJob)->once();
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user