mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-29 18:20:01 +00:00
Improve test coverage.
This commit is contained in:
@@ -153,7 +153,6 @@ class ReportFormRequest extends Request
|
|||||||
*/
|
*/
|
||||||
public function getExpenseList(): Collection
|
public function getExpenseList(): Collection
|
||||||
{
|
{
|
||||||
// fixed
|
|
||||||
/** @var AccountRepositoryInterface $repository */
|
/** @var AccountRepositoryInterface $repository */
|
||||||
$repository = app(AccountRepositoryInterface::class);
|
$repository = app(AccountRepositoryInterface::class);
|
||||||
$set = $this->get('exp_rev');
|
$set = $this->get('exp_rev');
|
||||||
|
@@ -425,8 +425,14 @@ class ReportControllerTest extends TestCase
|
|||||||
$userRepos = $this->mock(UserRepositoryInterface::class);
|
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||||
$fiscalHelper = $this->mock(FiscalHelperInterface::class);
|
$fiscalHelper = $this->mock(FiscalHelperInterface::class);
|
||||||
$reportHelper = $this->mock(ReportHelperInterface::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);
|
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
|
||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
|
Reference in New Issue
Block a user