Skip to content

Firefly III: a personal finances manager

Small test fixes.

James Cole9a34bb7e7a47
diff --git a/tests/Feature/Controllers/Chart/AccountControllerTest.php b/tests/Feature/Controllers/Chart/AccountControllerTest.php
index 85646105b0..32bc967afb 100644
--- a/tests/Feature/Controllers/Chart/AccountControllerTest.php
+++ b/tests/Feature/Controllers/Chart/AccountControllerTest.php
@@ -118,7 +118,7 @@ class AccountControllerTest extends TestCase
$collector->shouldReceive('withBudgetInformation')->andReturnSelf();
$collector->shouldReceive('setTypes')->withArgs([[TransactionType::WITHDRAWAL]])->andReturnSelf();
$collector->shouldReceive('getTransactions')->andReturn(new Collection([$transaction]));
- $generator->shouldReceive('pieChart')->andReturn([]);
+ $generator->shouldReceive('multiCurrencyPieChart')->andReturn([]);
$budgetRepos->shouldReceive('getBudgets')->andReturn(new Collection);
$this->be($this->user());
@@ -147,7 +147,7 @@ class AccountControllerTest extends TestCase
$collector->shouldReceive('withBudgetInformation')->andReturnSelf();
$collector->shouldReceive('setTypes')->withArgs([[TransactionType::WITHDRAWAL]])->andReturnSelf();
$collector->shouldReceive('getTransactions')->andReturn(new Collection([$transaction]));
- $generator->shouldReceive('pieChart')->andReturn([]);
+ $generator->shouldReceive('multiCurrencyPieChart')->andReturn([]);
$budgetRepos->shouldReceive('getBudgets')->andReturn(new Collection);
$accountRepos->shouldReceive('oldestJournalDate')->andReturn(Carbon::createFromTimestamp(time())->startOfMonth());
@@ -179,7 +179,7 @@ class AccountControllerTest extends TestCase
$collector->shouldReceive('withCategoryInformation')->andReturnSelf();
$collector->shouldReceive('setTypes')->withArgs([[TransactionType::WITHDRAWAL]])->andReturnSelf();
$collector->shouldReceive('getTransactions')->andReturn(new Collection([$transaction]));
- $generator->shouldReceive('pieChart')->andReturn([]);
+ $generator->shouldReceive('multiCurrencyPieChart')->andReturn([]);
$categoryRepos->shouldReceive('getCategories')->andReturn(new Collection([$category]));
$this->be($this->user());
@@ -210,7 +210,7 @@ class AccountControllerTest extends TestCase
$collector->shouldReceive('withCategoryInformation')->andReturnSelf();
$collector->shouldReceive('setTypes')->withArgs([[TransactionType::WITHDRAWAL]])->andReturnSelf();
$collector->shouldReceive('getTransactions')->andReturn(new Collection([$transaction]));
- $generator->shouldReceive('pieChart')->andReturn([]);
+ $generator->shouldReceive('multiCurrencyPieChart')->andReturn([]);
$categoryRepos->shouldReceive('getCategories')->andReturn(new Collection([$category]));
$accountRepos->shouldReceive('oldestJournalDate')->andReturn(Carbon::createFromTimestamp(time())->startOfMonth());
@@ -269,7 +269,7 @@ class AccountControllerTest extends TestCase
$collector->shouldReceive('withCategoryInformation')->andReturnSelf();
$collector->shouldReceive('setTypes')->withArgs([[TransactionType::DEPOSIT]])->andReturnSelf();
$collector->shouldReceive('getTransactions')->andReturn(new Collection([$transaction]));
- $generator->shouldReceive('pieChart')->andReturn([]);
+ $generator->shouldReceive('multiCurrencyPieChart')->andReturn([]);
$categoryRepos->shouldReceive('getCategories')->andReturn(new Collection([$account]));
$this->be($this->user());
@@ -299,7 +299,7 @@ class AccountControllerTest extends TestCase
$collector->shouldReceive('withCategoryInformation')->andReturnSelf();
$collector->shouldReceive('setTypes')->withArgs([[TransactionType::DEPOSIT]])->andReturnSelf();
$collector->shouldReceive('getTransactions')->andReturn(new Collection([$transaction]));
- $generator->shouldReceive('pieChart')->andReturn([]);
+ $generator->shouldReceive('multiCurrencyPieChart')->andReturn([]);
$categoryRepos->shouldReceive('getCategories')->andReturn(new Collection([$account]));
$accountRepos->shouldReceive('oldestJournalDate')->andReturn(Carbon::createFromTimestamp(time())->startOfMonth());
diff --git a/tests/Unit/Import/Converter/AmountNegatedTest.php b/tests/Unit/Import/Converter/AmountNegatedTest.php
index defa4cf6d3..bdf8c98fce 100644
--- a/tests/Unit/Import/Converter/AmountNegatedTest.php
+++ b/tests/Unit/Import/Converter/AmountNegatedTest.php
@@ -1,6 +1,6 @@
<?php
/**
- * AmountCreditTest.php
+ * AmountNegatedTest.php
* Copyright (c) 2017 [email protected]
*
* This file is part of Firefly III.
diff --git a/tests/Unit/Import/Mapper/BillsTest.php b/tests/Unit/Import/Mapper/BillsTest.php
index 205831d1aa..27f38997ab 100644
--- a/tests/Unit/Import/Mapper/BillsTest.php
+++ b/tests/Unit/Import/Mapper/BillsTest.php
@@ -27,8 +27,8 @@ use FireflyIII\Import\Mapper\Bills;
use FireflyIII\Models\Bill;
use FireflyIII\Repositories\Bill\BillRepositoryInterface;
use Illuminate\Support\Collection;
-use Tests\TestCase;
use Log;
+use Tests\TestCase;
/**
* Class BillsTest
diff --git a/tests/Unit/Import/Mapper/BudgetsTest.php b/tests/Unit/Import/Mapper/BudgetsTest.php
index 46c1575dbd..ac867a9ac7 100644
--- a/tests/Unit/Import/Mapper/BudgetsTest.php
+++ b/tests/Unit/Import/Mapper/BudgetsTest.php
@@ -27,8 +27,8 @@ use FireflyIII\Import\Mapper\Budgets;
use FireflyIII\Models\Budget;
use FireflyIII\Repositories\Budget\BudgetRepositoryInterface;
use Illuminate\Support\Collection;
-use Tests\TestCase;
use Log;
+use Tests\TestCase;
/**
* Class BudgetsTest
diff --git a/tests/Unit/Import/Mapper/CategoriesTest.php b/tests/Unit/Import/Mapper/CategoriesTest.php
index a344c651ec..fc85294932 100644
--- a/tests/Unit/Import/Mapper/CategoriesTest.php
+++ b/tests/Unit/Import/Mapper/CategoriesTest.php
@@ -27,8 +27,8 @@ use FireflyIII\Import\Mapper\Categories;
use FireflyIII\Models\Category;
use FireflyIII\Repositories\Category\CategoryRepositoryInterface;
use Illuminate\Support\Collection;
-use Tests\TestCase;
use Log;
+use Tests\TestCase;
/**
* Class CategoriesTest
diff --git a/tests/Unit/Import/Mapper/TagsTest.php b/tests/Unit/Import/Mapper/TagsTest.php
index e1bac8af62..1305bea9c3 100644
--- a/tests/Unit/Import/Mapper/TagsTest.php
+++ b/tests/Unit/Import/Mapper/TagsTest.php
@@ -27,8 +27,9 @@ use FireflyIII\Import\Mapper\Tags;
use FireflyIII\Models\Tag;
use FireflyIII\Repositories\Tag\TagRepositoryInterface;
use Illuminate\Support\Collection;
-use Tests\TestCase;
use Log;
+use Tests\TestCase;
+
/**
* Class TagsTest
*/
diff --git a/tests/Unit/Import/Mapper/TransactionCurrenciesTest.php b/tests/Unit/Import/Mapper/TransactionCurrenciesTest.php
index ee97c8dcbf..4a6a1c3b47 100644
--- a/tests/Unit/Import/Mapper/TransactionCurrenciesTest.php
+++ b/tests/Unit/Import/Mapper/TransactionCurrenciesTest.php
@@ -27,8 +27,8 @@ use FireflyIII\Import\Mapper\TransactionCurrencies;
use FireflyIII\Models\TransactionCurrency;
use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface;
use Illuminate\Support\Collection;
-use Tests\TestCase;
use Log;
+use Tests\TestCase;
/**
* Class TransactionCurrenciesTest