Code consistency and new tests.

This commit is contained in:
James Cole
2018-05-12 15:50:01 +02:00
parent a47da92d81
commit 5bf520b6ed
35 changed files with 1262 additions and 1157 deletions

View File

@@ -65,7 +65,7 @@ class FakeRoutineTest extends TestCase
$routine = new FakeRoutine;
$routine->setJob($job);
$routine->setImportJob($job);
try {
$routine->run();
} catch (FireflyException $e) {
@@ -98,10 +98,10 @@ class FakeRoutineTest extends TestCase
$repository->shouldReceive('setStage')->withArgs([Mockery::any(), 'final'])->once();
$repository->shouldReceive('setTransactions')->withArgs([Mockery::any(), []])->once();
$handler->shouldReceive('getTransactions')->once()->andReturn([]);
$handler->shouldReceive('setJob')->once();
$handler->shouldReceive('setImportJob')->once();
$routine = new FakeRoutine;
$routine->setJob($job);
$routine->setImportJob($job);
try {
$routine->run();
} catch (FireflyException $e) {
@@ -136,7 +136,7 @@ class FakeRoutineTest extends TestCase
$routine = new FakeRoutine;
$routine->setJob($job);
$routine->setImportJob($job);
try {
$routine->run();
} catch (FireflyException $e) {

View File

@@ -63,12 +63,12 @@ class FileRoutineTest extends TestCase
$repository->shouldReceive('setStage')->withArgs([Mockery::any(), 'final'])->once();
$repository->shouldReceive('setTransactions')->withArgs([Mockery::any(), ['a' => 'b']])->once();
$repository->shouldReceive('getConfiguration')->withArgs([Mockery::any()])->once()->andReturn([]);
$processor->shouldReceive('setJob')->once();
$processor->shouldReceive('setImportJob')->once();
$processor->shouldReceive('run')->once()->andReturn(['a' => 'b']);
$routine = new FileRoutine;
$routine->setJob($job);
$routine->setImportJob($job);
try {
$routine->run();
} catch (FireflyException $e) {