mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-28 00:57:11 +00:00
Improve test coverage.
This commit is contained in:
@@ -26,6 +26,7 @@ use Carbon\Carbon;
|
||||
use FireflyIII\Helpers\Fiscal\FiscalHelperInterface;
|
||||
use FireflyIII\Repositories\Account\AccountTaskerInterface;
|
||||
use Log;
|
||||
use Preferences;
|
||||
use Tests\TestCase;
|
||||
|
||||
/**
|
||||
@@ -65,6 +66,8 @@ class OperationsControllerTest extends TestCase
|
||||
$tasker = $this->mock(AccountTaskerInterface::class);
|
||||
$fiscalHelper = $this->mock(FiscalHelperInterface::class);
|
||||
$date = new Carbon;
|
||||
|
||||
Preferences::shouldReceive('lastActivity')->atLeast()->once()->andReturn('md512345');
|
||||
$fiscalHelper->shouldReceive('endOfFiscalYear')->atLeast()->once()->andReturn($date);
|
||||
$fiscalHelper->shouldReceive('startOfFiscalYear')->atLeast()->once()->andReturn($date);
|
||||
$tasker->shouldReceive('getExpenseReport')->andReturn($return);
|
||||
@@ -83,6 +86,8 @@ class OperationsControllerTest extends TestCase
|
||||
$tasker = $this->mock(AccountTaskerInterface::class);
|
||||
$fiscalHelper = $this->mock(FiscalHelperInterface::class);
|
||||
$date = new Carbon;
|
||||
|
||||
Preferences::shouldReceive('lastActivity')->atLeast()->once()->andReturn('md512345');
|
||||
$fiscalHelper->shouldReceive('endOfFiscalYear')->atLeast()->once()->andReturn($date);
|
||||
$fiscalHelper->shouldReceive('startOfFiscalYear')->atLeast()->once()->andReturn($date);
|
||||
$tasker->shouldReceive('getIncomeReport')->andReturn([]);
|
||||
@@ -111,6 +116,8 @@ class OperationsControllerTest extends TestCase
|
||||
$tasker = $this->mock(AccountTaskerInterface::class);
|
||||
$fiscalHelper = $this->mock(FiscalHelperInterface::class);
|
||||
$date = new Carbon;
|
||||
|
||||
Preferences::shouldReceive('lastActivity')->atLeast()->once()->andReturn('md512345');
|
||||
$fiscalHelper->shouldReceive('endOfFiscalYear')->atLeast()->once()->andReturn($date);
|
||||
$fiscalHelper->shouldReceive('startOfFiscalYear')->atLeast()->once()->andReturn($date);
|
||||
$tasker->shouldReceive('getExpenseReport')->andReturn($return);
|
||||
|
Reference in New Issue
Block a user