mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-22 20:16:22 +00:00
Update tests.
This commit is contained in:
@@ -13,6 +13,7 @@ namespace Tests\Feature\Controllers;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use FireflyIII\Helpers\Collector\JournalCollectorInterface;
|
||||
use FireflyIII\Helpers\Filter\InternalTransferFilter;
|
||||
use FireflyIII\Models\Category;
|
||||
use FireflyIII\Models\Transaction;
|
||||
use FireflyIII\Models\TransactionJournal;
|
||||
@@ -138,7 +139,7 @@ class CategoryControllerTest extends TestCase
|
||||
$collector->shouldReceive('getPaginatedJournals')->andReturn(new LengthAwarePaginator([], 0, 10));
|
||||
|
||||
$collector->shouldReceive('setPage')->andReturnSelf();
|
||||
$collector->shouldReceive('disableInternalFilter')->andReturnSelf();
|
||||
$collector->shouldReceive('removeFilter')->withArgs([InternalTransferFilter::class])->andReturnSelf();
|
||||
$collector->shouldReceive('setLimit')->andReturnSelf();
|
||||
|
||||
Steam::shouldReceive('positive')->once()->andReturn('1');
|
||||
@@ -174,7 +175,7 @@ class CategoryControllerTest extends TestCase
|
||||
$collector->shouldReceive('getPaginatedJournals')->andReturn(new LengthAwarePaginator([], 0, 10));
|
||||
|
||||
$collector->shouldReceive('setPage')->andReturnSelf();
|
||||
$collector->shouldReceive('disableInternalFilter')->andReturnSelf();
|
||||
$collector->shouldReceive('removeFilter')->withArgs([InternalTransferFilter::class])->andReturnSelf();
|
||||
$collector->shouldReceive('setLimit')->andReturnSelf();
|
||||
|
||||
$this->be($this->user());
|
||||
@@ -208,7 +209,7 @@ class CategoryControllerTest extends TestCase
|
||||
$collector->shouldReceive('getPaginatedJournals')->andReturn(new LengthAwarePaginator([], 0, 10));
|
||||
|
||||
$collector->shouldReceive('setPage')->andReturnSelf();
|
||||
$collector->shouldReceive('disableInternalFilter')->andReturnSelf();
|
||||
$collector->shouldReceive('removeFilter')->withArgs([InternalTransferFilter::class])->andReturnSelf();
|
||||
$collector->shouldReceive('setLimit')->andReturnSelf();
|
||||
|
||||
Steam::shouldReceive('positive')->once()->andReturn('1');
|
||||
@@ -249,7 +250,7 @@ class CategoryControllerTest extends TestCase
|
||||
$collector->shouldReceive('setLimit')->andReturnSelf()->once();
|
||||
$collector->shouldReceive('setAllAssetAccounts')->andReturnSelf()->twice();
|
||||
$collector->shouldReceive('setRange')->andReturnSelf()->twice();
|
||||
$collector->shouldReceive('disableInternalFilter')->andReturnSelf()->twice();
|
||||
$collector->shouldReceive('removeFilter')->withArgs([InternalTransferFilter::class])->andReturnSelf()->twice();
|
||||
$collector->shouldReceive('setTypes')->andReturnSelf()->once();
|
||||
$collector->shouldReceive('withBudgetInformation')->andReturnSelf()->once();
|
||||
$collector->shouldReceive('withCategoryInformation')->andReturnSelf()->once();
|
||||
@@ -287,7 +288,7 @@ class CategoryControllerTest extends TestCase
|
||||
$collector->shouldReceive('withBudgetInformation')->andReturnSelf()->once();
|
||||
$collector->shouldReceive('withCategoryInformation')->andReturnSelf()->once();
|
||||
$collector->shouldReceive('withOpposingAccount')->andReturnSelf()->once();
|
||||
$collector->shouldReceive('disableInternalFilter')->andReturnSelf()->once();
|
||||
$collector->shouldReceive('removeFilter')->withArgs([InternalTransferFilter::class])->andReturnSelf()->once();
|
||||
|
||||
$collector->shouldReceive('setCategory')->andReturnSelf()->once();
|
||||
$collector->shouldReceive('getPaginatedJournals')->andReturn(new LengthAwarePaginator([$transaction], 0, 10))->once();
|
||||
@@ -326,7 +327,7 @@ class CategoryControllerTest extends TestCase
|
||||
$collector->shouldReceive('setLimit')->andReturnSelf()->once();
|
||||
$collector->shouldReceive('setAllAssetAccounts')->andReturnSelf()->twice();
|
||||
$collector->shouldReceive('setRange')->andReturnSelf()->twice();
|
||||
$collector->shouldReceive('disableInternalFilter')->andReturnSelf()->twice();
|
||||
$collector->shouldReceive('removeFilter')->withArgs([InternalTransferFilter::class])->andReturnSelf()->twice();
|
||||
$collector->shouldReceive('setTypes')->andReturnSelf()->once();
|
||||
$collector->shouldReceive('withBudgetInformation')->andReturnSelf()->once();
|
||||
$collector->shouldReceive('withCategoryInformation')->andReturnSelf()->once();
|
||||
@@ -375,7 +376,7 @@ class CategoryControllerTest extends TestCase
|
||||
$collector->shouldReceive('setAllAssetAccounts')->andReturnSelf()->times(4);
|
||||
$collector->shouldReceive('setRange')->andReturnSelf()->times(4);
|
||||
$collector->shouldReceive('setTypes')->andReturnSelf()->times(1);
|
||||
$collector->shouldReceive('disableInternalFilter')->andReturnSelf()->times(4);
|
||||
$collector->shouldReceive('removeFilter')->withArgs([InternalTransferFilter::class])->andReturnSelf()->times(4);
|
||||
$collector->shouldReceive('withBudgetInformation')->andReturnSelf()->times(3);
|
||||
$collector->shouldReceive('withCategoryInformation')->andReturnSelf()->times(3);
|
||||
$collector->shouldReceive('withOpposingAccount')->andReturnSelf()->times(4);
|
||||
|
@@ -16,6 +16,7 @@ use Carbon\Carbon;
|
||||
use FireflyIII\Generator\Chart\Basic\GeneratorInterface;
|
||||
use FireflyIII\Helpers\Chart\MetaPieChartInterface;
|
||||
use FireflyIII\Helpers\Collector\JournalCollectorInterface;
|
||||
use FireflyIII\Helpers\Filter\TransferFilter;
|
||||
use FireflyIII\Models\BudgetLimit;
|
||||
use FireflyIII\Models\Transaction;
|
||||
use FireflyIII\Models\TransactionType;
|
||||
@@ -102,7 +103,7 @@ class BudgetReportControllerTest extends TestCase
|
||||
$collector->shouldReceive('setRange')->andReturnSelf();
|
||||
$collector->shouldReceive('setTypes')->withArgs([[TransactionType::WITHDRAWAL, TransactionType::TRANSFER]])->andReturnSelf();
|
||||
$collector->shouldReceive('setTypes')->withArgs([[TransactionType::DEPOSIT, TransactionType::TRANSFER]])->andReturnSelf();
|
||||
$collector->shouldReceive('disableFilter')->andReturnSelf();
|
||||
$collector->shouldReceive('removeFilter')->withArgs([TransferFilter::class])->andReturnSelf();
|
||||
$collector->shouldReceive('setBudgets')->andReturnSelf();
|
||||
$collector->shouldReceive('withOpposingAccount')->andReturnSelf();
|
||||
$collector->shouldReceive('getJournals')->andReturn(new Collection([$transaction]));
|
||||
|
@@ -15,6 +15,7 @@ namespace Tests\Feature\Controllers\Chart;
|
||||
use FireflyIII\Generator\Chart\Basic\GeneratorInterface;
|
||||
use FireflyIII\Helpers\Chart\MetaPieChartInterface;
|
||||
use FireflyIII\Helpers\Collector\JournalCollectorInterface;
|
||||
use FireflyIII\Helpers\Filter\TransferFilter;
|
||||
use FireflyIII\Models\Transaction;
|
||||
use FireflyIII\Models\TransactionType;
|
||||
use Illuminate\Support\Collection;
|
||||
@@ -129,7 +130,7 @@ class CategoryReportControllerTest extends TestCase
|
||||
$collector->shouldReceive('setRange')->andReturnSelf();
|
||||
$collector->shouldReceive('setTypes')->withArgs([[TransactionType::WITHDRAWAL, TransactionType::TRANSFER]])->andReturnSelf();
|
||||
$collector->shouldReceive('setTypes')->withArgs([[TransactionType::DEPOSIT, TransactionType::TRANSFER]])->andReturnSelf();
|
||||
$collector->shouldReceive('disableFilter')->andReturnSelf();
|
||||
$collector->shouldReceive('removeFilter')->withArgs([TransferFilter::class])->andReturnSelf();
|
||||
$collector->shouldReceive('setCategories')->andReturnSelf();
|
||||
$collector->shouldReceive('withOpposingAccount')->andReturnSelf();
|
||||
$collector->shouldReceive('getJournals')->andReturn($transactions);
|
||||
|
@@ -15,6 +15,7 @@ namespace Tests\Feature\Controllers\Chart;
|
||||
use FireflyIII\Generator\Chart\Basic\GeneratorInterface;
|
||||
use FireflyIII\Helpers\Chart\MetaPieChartInterface;
|
||||
use FireflyIII\Helpers\Collector\JournalCollectorInterface;
|
||||
use FireflyIII\Helpers\Filter\TransferFilter;
|
||||
use FireflyIII\Models\Tag;
|
||||
use FireflyIII\Models\Transaction;
|
||||
use FireflyIII\Models\TransactionType;
|
||||
@@ -139,7 +140,7 @@ class TagReportControllerTest extends TestCase
|
||||
$collector->shouldReceive('setRange')->andReturnSelf();
|
||||
$collector->shouldReceive('setTypes')->withArgs([[TransactionType::WITHDRAWAL, TransactionType::TRANSFER]])->andReturnSelf();
|
||||
$collector->shouldReceive('setTypes')->withArgs([[TransactionType::DEPOSIT, TransactionType::TRANSFER]])->andReturnSelf();
|
||||
$collector->shouldReceive('disableFilter')->andReturnSelf();
|
||||
$collector->shouldReceive('removeFilter')->withArgs([TransferFilter::class])->andReturnSelf();
|
||||
$collector->shouldReceive('setTags')->andReturnSelf();
|
||||
$collector->shouldReceive('withOpposingAccount')->andReturnSelf();
|
||||
$collector->shouldReceive('getJournals')->andReturn($set);
|
||||
|
@@ -13,6 +13,7 @@ namespace Tests\Feature\Controllers\Report;
|
||||
|
||||
|
||||
use FireflyIII\Helpers\Collector\JournalCollectorInterface;
|
||||
use FireflyIII\Helpers\Filter\InternalTransferFilter;
|
||||
use FireflyIII\Models\Transaction;
|
||||
use FireflyIII\Models\TransactionType;
|
||||
use Tests\TestCase;
|
||||
@@ -36,7 +37,7 @@ class OperationsControllerTest extends TestCase
|
||||
$collector->shouldReceive('setRange')->andReturnSelf();
|
||||
$collector->shouldReceive('setTypes')->withArgs([[TransactionType::WITHDRAWAL, TransactionType::TRANSFER]])->andReturnSelf();
|
||||
$collector->shouldReceive('withOpposingAccount')->andReturnSelf();
|
||||
$collector->shouldReceive('enableInternalFilter')->andReturnSelf();
|
||||
$collector->shouldReceive('addFilter')->withArgs([InternalTransferFilter::class])->andReturnSelf();
|
||||
$collector->shouldReceive('getJournals')->andReturn($transactions);
|
||||
|
||||
|
||||
@@ -57,7 +58,7 @@ class OperationsControllerTest extends TestCase
|
||||
$collector->shouldReceive('setRange')->andReturnSelf();
|
||||
$collector->shouldReceive('setTypes')->withArgs([[TransactionType::DEPOSIT, TransactionType::TRANSFER]])->andReturnSelf();
|
||||
$collector->shouldReceive('withOpposingAccount')->andReturnSelf();
|
||||
$collector->shouldReceive('enableInternalFilter')->andReturnSelf();
|
||||
$collector->shouldReceive('addFilter')->withArgs([InternalTransferFilter::class])->andReturnSelf();
|
||||
$collector->shouldReceive('getJournals')->andReturn($transactions);
|
||||
|
||||
$this->be($this->user());
|
||||
@@ -78,7 +79,7 @@ class OperationsControllerTest extends TestCase
|
||||
$collector->shouldReceive('setTypes')->withArgs([[TransactionType::DEPOSIT, TransactionType::TRANSFER]])->andReturnSelf()->once();
|
||||
$collector->shouldReceive('setTypes')->withArgs([[TransactionType::WITHDRAWAL, TransactionType::TRANSFER]])->andReturnSelf()->once();
|
||||
$collector->shouldReceive('withOpposingAccount')->andReturnSelf();
|
||||
$collector->shouldReceive('enableInternalFilter')->andReturnSelf();
|
||||
$collector->shouldReceive('addFilter')->withArgs([InternalTransferFilter::class])->andReturnSelf();
|
||||
$collector->shouldReceive('getJournals')->andReturn($transactions);
|
||||
|
||||
$this->be($this->user());
|
||||
|
@@ -13,6 +13,7 @@ namespace Tests\Feature\Controllers;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use FireflyIII\Helpers\Collector\JournalCollectorInterface;
|
||||
use FireflyIII\Helpers\Filter\InternalTransferFilter;
|
||||
use FireflyIII\Models\TransactionJournal;
|
||||
use FireflyIII\Repositories\Journal\JournalRepositoryInterface;
|
||||
use FireflyIII\Repositories\Journal\JournalTaskerInterface;
|
||||
@@ -45,7 +46,7 @@ class TransactionControllerTest extends TestCase
|
||||
$collector->shouldReceive('withBudgetInformation')->andReturnSelf();
|
||||
$collector->shouldReceive('withCategoryInformation')->andReturnSelf();
|
||||
$collector->shouldReceive('withOpposingAccount')->andReturnSelf();
|
||||
$collector->shouldReceive('disableInternalFilter')->andReturnSelf();
|
||||
$collector->shouldReceive('removeFilter')->withArgs([InternalTransferFilter::class])->andReturnSelf();
|
||||
$collector->shouldReceive('getPaginatedJournals')->andReturn(new LengthAwarePaginator([], 0, 10));
|
||||
$collector->shouldReceive('getJournals')->andReturn(new Collection);
|
||||
|
||||
@@ -76,7 +77,7 @@ class TransactionControllerTest extends TestCase
|
||||
$collector->shouldReceive('withBudgetInformation')->andReturnSelf();
|
||||
$collector->shouldReceive('withCategoryInformation')->andReturnSelf();
|
||||
$collector->shouldReceive('withOpposingAccount')->andReturnSelf();
|
||||
$collector->shouldReceive('disableInternalFilter')->andReturnSelf();
|
||||
$collector->shouldReceive('removeFilter')->withArgs([InternalTransferFilter::class])->andReturnSelf();
|
||||
$collector->shouldReceive('getPaginatedJournals')->andReturn(new LengthAwarePaginator([], 0, 10));
|
||||
$collector->shouldReceive('getJournals')->andReturn(new Collection);
|
||||
|
||||
@@ -106,7 +107,7 @@ class TransactionControllerTest extends TestCase
|
||||
$collector->shouldReceive('withBudgetInformation')->andReturnSelf();
|
||||
$collector->shouldReceive('withCategoryInformation')->andReturnSelf();
|
||||
$collector->shouldReceive('withOpposingAccount')->andReturnSelf();
|
||||
$collector->shouldReceive('disableInternalFilter')->andReturnSelf();
|
||||
$collector->shouldReceive('removeFilter')->withArgs([InternalTransferFilter::class])->andReturnSelf();
|
||||
$collector->shouldReceive('getPaginatedJournals')->andReturn(new LengthAwarePaginator([], 0, 10));
|
||||
$collector->shouldReceive('getJournals')->andReturn(new Collection);
|
||||
|
||||
@@ -139,7 +140,7 @@ class TransactionControllerTest extends TestCase
|
||||
$collector->shouldReceive('withBudgetInformation')->andReturnSelf();
|
||||
$collector->shouldReceive('withCategoryInformation')->andReturnSelf();
|
||||
$collector->shouldReceive('withOpposingAccount')->andReturnSelf();
|
||||
$collector->shouldReceive('disableInternalFilter')->andReturnSelf();
|
||||
$collector->shouldReceive('removeFilter')->withArgs([InternalTransferFilter::class])->andReturnSelf();
|
||||
$collector->shouldReceive('getPaginatedJournals')->andReturn(new LengthAwarePaginator([], 0, 10));
|
||||
$collector->shouldReceive('getJournals')->andReturn(new Collection);
|
||||
|
||||
@@ -170,7 +171,7 @@ class TransactionControllerTest extends TestCase
|
||||
$collector->shouldReceive('withBudgetInformation')->andReturnSelf();
|
||||
$collector->shouldReceive('withCategoryInformation')->andReturnSelf();
|
||||
$collector->shouldReceive('withOpposingAccount')->andReturnSelf();
|
||||
$collector->shouldReceive('disableInternalFilter')->andReturnSelf();
|
||||
$collector->shouldReceive('removeFilter')->withArgs([InternalTransferFilter::class])->andReturnSelf();
|
||||
$collector->shouldReceive('getPaginatedJournals')->andReturn(new LengthAwarePaginator([], 0, 10));
|
||||
$collector->shouldReceive('getJournals')->andReturn(new Collection);
|
||||
|
||||
|
Reference in New Issue
Block a user