mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Improve test coverage.
This commit is contained in:
@@ -51,6 +51,7 @@ class AccountControllerTest extends TestCase
|
||||
*/
|
||||
public function testGeneral(): void
|
||||
{
|
||||
$this->mockDefaultSession();
|
||||
$return = [
|
||||
'accounts' => [],
|
||||
'start' => '0',
|
||||
|
@@ -53,6 +53,7 @@ class BalanceControllerTest extends TestCase
|
||||
*/
|
||||
public function testGeneral(): void
|
||||
{
|
||||
$this->mockDefaultSession();
|
||||
$balance = $this->mock(BalanceReportHelperInterface::class);
|
||||
$fiscalHelper = $this->mock(FiscalHelperInterface::class);
|
||||
$date = new Carbon;
|
||||
|
@@ -54,6 +54,7 @@ class BudgetControllerTest extends TestCase
|
||||
*/
|
||||
public function testGeneral(): void
|
||||
{
|
||||
$this->mockDefaultSession();
|
||||
$return = [];
|
||||
$helper = $this->mock(BudgetReportHelperInterface::class);
|
||||
$fiscalHelper = $this->mock(FiscalHelperInterface::class);
|
||||
@@ -72,6 +73,7 @@ class BudgetControllerTest extends TestCase
|
||||
*/
|
||||
public function testPeriod(): void
|
||||
{
|
||||
$this->mockDefaultSession();
|
||||
$first = [1 => ['entries' => ['1', '1']]];
|
||||
$second = ['entries' => ['1', '1']];
|
||||
$repository = $this->mock(BudgetRepositoryInterface::class);
|
||||
|
@@ -54,6 +54,7 @@ class CategoryControllerTest extends TestCase
|
||||
*/
|
||||
public function testExpenses(): void
|
||||
{
|
||||
$this->mockDefaultSession();
|
||||
$first = [1 => ['entries' => ['1', '1']]];
|
||||
$second = ['entries' => ['1', '1']];
|
||||
$repository = $this->mock(CategoryRepositoryInterface::class);
|
||||
@@ -75,6 +76,7 @@ class CategoryControllerTest extends TestCase
|
||||
*/
|
||||
public function testIncome(): void
|
||||
{
|
||||
$this->mockDefaultSession();
|
||||
$first = [1 => ['entries' => ['1', '1']]];
|
||||
$second = ['entries' => ['1', '1']];
|
||||
$repository = $this->mock(CategoryRepositoryInterface::class);
|
||||
@@ -96,8 +98,9 @@ class CategoryControllerTest extends TestCase
|
||||
*/
|
||||
public function testOperations(): void
|
||||
{
|
||||
$this->mockDefaultSession();
|
||||
$repository = $this->mock(CategoryRepositoryInterface::class);
|
||||
$category = factory(Category::class)->make();
|
||||
$category = $this->getRandomCategory();
|
||||
$fiscalHelper = $this->mock(FiscalHelperInterface::class);
|
||||
$date = new Carbon;
|
||||
$fiscalHelper->shouldReceive('endOfFiscalYear')->atLeast()->once()->andReturn($date);
|
||||
|
@@ -56,6 +56,7 @@ class ExpenseControllerTest extends TestCase
|
||||
*/
|
||||
public function testBudget(): void
|
||||
{
|
||||
|
||||
$repository = $this->mock(AccountRepositoryInterface::class);
|
||||
$fiscalHelper = $this->mock(FiscalHelperInterface::class);
|
||||
$collector = $this->mock(GroupCollectorInterface::class);
|
||||
|
@@ -52,6 +52,7 @@ class OperationsControllerTest extends TestCase
|
||||
*/
|
||||
public function testExpenses(): void
|
||||
{
|
||||
$this->mockDefaultSession();
|
||||
$return = [
|
||||
1 => [
|
||||
'id' => 1,
|
||||
@@ -78,6 +79,7 @@ class OperationsControllerTest extends TestCase
|
||||
*/
|
||||
public function testIncome(): void
|
||||
{
|
||||
$this->mockDefaultSession();
|
||||
$tasker = $this->mock(AccountTaskerInterface::class);
|
||||
$fiscalHelper = $this->mock(FiscalHelperInterface::class);
|
||||
$date = new Carbon;
|
||||
@@ -95,6 +97,7 @@ class OperationsControllerTest extends TestCase
|
||||
*/
|
||||
public function testOperations(): void
|
||||
{
|
||||
$this->mockDefaultSession();
|
||||
$return = [
|
||||
1 => [
|
||||
'id' => 1,
|
||||
|
Reference in New Issue
Block a user