mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-22 12:11:19 +00:00
Fix some tests.
This commit is contained in:
@@ -26,7 +26,6 @@ use Carbon\Carbon;
|
||||
use FireflyIII\Generator\Chart\Basic\GeneratorInterface;
|
||||
use FireflyIII\Helpers\Fiscal\FiscalHelperInterface;
|
||||
use FireflyIII\Helpers\Report\NetWorthInterface;
|
||||
use FireflyIII\Models\TransactionCurrency;
|
||||
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
|
||||
use FireflyIII\Repositories\Account\AccountTaskerInterface;
|
||||
use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface;
|
||||
@@ -116,8 +115,12 @@ class ReportControllerTest extends TestCase
|
||||
|
||||
$fiscalHelper->shouldReceive('endOfFiscalYear')->atLeast()->once()->andReturn($date);
|
||||
$fiscalHelper->shouldReceive('startOfFiscalYear')->atLeast()->once()->andReturn($date);
|
||||
$income = [1 => ['sum' => '100']];
|
||||
$expense = [2 => ['sum' => '-100']];
|
||||
$income = [
|
||||
'accounts' => [
|
||||
1 => ['sum' => '100']]];
|
||||
$expense = [
|
||||
'accounts' => [
|
||||
2 => ['sum' => '-100']]];
|
||||
$tasker->shouldReceive('getIncomeReport')->once()->andReturn($income);
|
||||
$tasker->shouldReceive('getExpenseReport')->once()->andReturn($expense);
|
||||
$generator->shouldReceive('multiSet')->andReturn([]);
|
||||
@@ -144,8 +147,12 @@ class ReportControllerTest extends TestCase
|
||||
$fiscalHelper->shouldReceive('endOfFiscalYear')->atLeast()->once()->andReturn($date);
|
||||
$fiscalHelper->shouldReceive('startOfFiscalYear')->atLeast()->once()->andReturn($date);
|
||||
|
||||
$income = [];
|
||||
$expense = [];
|
||||
$income = [
|
||||
'accounts' => [
|
||||
1 => ['sum' => '100']]];
|
||||
$expense = [
|
||||
'accounts' => [
|
||||
2 => ['sum' => '-100']]];
|
||||
$tasker->shouldReceive('getIncomeReport')->andReturn($income)->times(1);
|
||||
$tasker->shouldReceive('getExpenseReport')->andReturn($expense)->times(1);
|
||||
|
||||
|
Reference in New Issue
Block a user