mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Various code clean up.
This commit is contained in:
@@ -99,10 +99,8 @@ class BudgetControllerTest extends TestCase
|
||||
*/
|
||||
public function testExpenseAsset(string $range)
|
||||
{
|
||||
$repository = $this->mock(BudgetRepositoryInterface::class);
|
||||
$generator = $this->mock(GeneratorInterface::class);
|
||||
$collector = $this->mock(JournalCollectorInterface::class);
|
||||
$catRepos = $this->mock(CategoryRepositoryInterface::class);
|
||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||
$transactions = factory(Transaction::class, 10)->make();
|
||||
$accounts = factory(Account::class, 10)->make();
|
||||
@@ -132,11 +130,9 @@ class BudgetControllerTest extends TestCase
|
||||
*/
|
||||
public function testExpenseCategory(string $range)
|
||||
{
|
||||
$repository = $this->mock(BudgetRepositoryInterface::class);
|
||||
$generator = $this->mock(GeneratorInterface::class);
|
||||
$collector = $this->mock(JournalCollectorInterface::class);
|
||||
$catRepos = $this->mock(CategoryRepositoryInterface::class);
|
||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||
|
||||
$transactions = factory(Transaction::class, 10)->make();
|
||||
$categories = factory(Category::class, 10)->make();
|
||||
@@ -167,16 +163,8 @@ class BudgetControllerTest extends TestCase
|
||||
*/
|
||||
public function testExpenseExpense(string $range)
|
||||
{
|
||||
$repository = $this->mock(BudgetRepositoryInterface::class);
|
||||
$generator = $this->mock(GeneratorInterface::class);
|
||||
$collector = $this->mock(JournalCollectorInterface::class);
|
||||
$catRepos = $this->mock(CategoryRepositoryInterface::class);
|
||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||
|
||||
$repository = $this->mock(BudgetRepositoryInterface::class);
|
||||
$generator = $this->mock(GeneratorInterface::class);
|
||||
$collector = $this->mock(JournalCollectorInterface::class);
|
||||
$catRepos = $this->mock(CategoryRepositoryInterface::class);
|
||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||
$transactions = factory(Transaction::class, 10)->make();
|
||||
$accounts = factory(Account::class, 10)->make();
|
||||
|
@@ -12,7 +12,6 @@ declare(strict_types=1);
|
||||
namespace Tests\Feature\Controllers;
|
||||
|
||||
use FireflyIII\Support\Search\SearchInterface;
|
||||
use Illuminate\Support\Collection;
|
||||
use Tests\TestCase;
|
||||
|
||||
/**
|
||||
|
@@ -63,9 +63,6 @@ class MetaPieChartTest extends TestCase
|
||||
|
||||
// mock all repositories:
|
||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||
$budgetRepos = $this->mock(BudgetRepositoryInterface::class);
|
||||
$categoryRepos = $this->mock(CategoryRepositoryInterface::class);
|
||||
$tagRepos = $this->mock(TagRepositoryInterface::class);
|
||||
|
||||
$accountRepos->shouldReceive('setUser');
|
||||
$accountRepos->shouldReceive('find')->withArgs([1])->andReturn($accounts[1]);
|
||||
@@ -126,9 +123,6 @@ class MetaPieChartTest extends TestCase
|
||||
|
||||
// mock all repositories:
|
||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||
$budgetRepos = $this->mock(BudgetRepositoryInterface::class);
|
||||
$categoryRepos = $this->mock(CategoryRepositoryInterface::class);
|
||||
$tagRepos = $this->mock(TagRepositoryInterface::class);
|
||||
|
||||
$accountRepos->shouldReceive('setUser');
|
||||
$accountRepos->shouldReceive('find')->withArgs([1])->andReturn($accounts[1]);
|
||||
|
Reference in New Issue
Block a user