Fix some tests

This commit is contained in:
James Cole
2019-12-22 07:50:40 +01:00
parent dfca5b8722
commit a416b682e0
12 changed files with 92 additions and 231 deletions

View File

@@ -720,8 +720,8 @@ class TransactionControllerTest extends TestCase
$apiRepos->shouldReceive('setUser')->atLeast()->once();
$validator->shouldReceive('setTransactionType')->withArgs(['invalid'])->atLeast()->once();
$validator->shouldReceive('validateSource')->withArgs([null, null])->atLeast()->once()->andReturn(true);
$validator->shouldReceive('validateDestination')->withArgs([null, null])->atLeast()->once()->andReturn(true);
//$validator->shouldReceive('validateSource')->withArgs([null, null])->atLeast()->once()->andReturn(true);
//$validator->shouldReceive('validateDestination')->withArgs([null, null])->atLeast()->once()->andReturn(true);
$data = [
'group_title' => 'Empty',
@@ -779,8 +779,8 @@ class TransactionControllerTest extends TestCase
$validator->shouldReceive('setTransactionType')->withArgs(['withdrawal'])->atLeast()->once();
$validator->shouldReceive('setTransactionType')->withArgs(['deposit'])->atLeast()->once();
$validator->shouldReceive('validateSource')->withArgs([null, null])->atLeast()->once()->andReturn(true);
$validator->shouldReceive('validateDestination')->withArgs([null, null])->atLeast()->once()->andReturn(true);
//$validator->shouldReceive('validateSource')->withArgs([null, null])->atLeast()->once()->andReturn(true);
//$validator->shouldReceive('validateDestination')->withArgs([null, null])->atLeast()->once()->andReturn(true);
// some mock calls:
$journalRepos->shouldReceive('setUser')->atLeast()->once();
@@ -845,8 +845,8 @@ class TransactionControllerTest extends TestCase
$apiRepos = $this->mock(JournalAPIRepositoryInterface::class);
$validator->shouldReceive('setTransactionType')->withArgs(['invalid'])->atLeast()->once();
$validator->shouldReceive('validateSource')->withArgs([null, null])->atLeast()->once()->andReturn(true);
$validator->shouldReceive('validateDestination')->withArgs([null, null])->atLeast()->once()->andReturn(true);
//$validator->shouldReceive('validateSource')->withArgs([null, null])->atLeast()->once()->andReturn(true);
//$validator->shouldReceive('validateDestination')->withArgs([null, null])->atLeast()->once()->andReturn(true);
// some mock calls:
$journalRepos->shouldReceive('setUser')->atLeast()->once();