mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-30 02:26:58 +00:00
Improve test coverage.
This commit is contained in:
@@ -153,7 +153,6 @@ class ReportFormRequest extends Request
|
||||
*/
|
||||
public function getExpenseList(): Collection
|
||||
{
|
||||
// fixed
|
||||
/** @var AccountRepositoryInterface $repository */
|
||||
$repository = app(AccountRepositoryInterface::class);
|
||||
$set = $this->get('exp_rev');
|
||||
|
@@ -425,8 +425,14 @@ class ReportControllerTest extends TestCase
|
||||
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||
$fiscalHelper = $this->mock(FiscalHelperInterface::class);
|
||||
$reportHelper = $this->mock(ReportHelperInterface::class);
|
||||
$asset = $this->getRandomAsset();
|
||||
// find the user's asset account
|
||||
$accountRepos->shouldReceive('findNull')->withArgs([1])->andReturn($asset)->atLeast()->once();
|
||||
|
||||
// do not find the exp_rev things.
|
||||
$accountRepos->shouldReceive('findNull')->withArgs([4])->andReturnNull()->atLeast()->once();
|
||||
|
||||
|
||||
$accountRepos->shouldReceive('findNull')->andReturn(null)->times(3);
|
||||
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
||||
|
||||
$data = [
|
||||
|
Reference in New Issue
Block a user