Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
This fixes the broken tests.
James Colebc67113d77dc
diff --git a/app/Repositories/Budget/BudgetRepository.php b/app/Repositories/Budget/BudgetRepository.phpindex 51ed3fef26..334bc6c6a7 100644--- a/app/Repositories/Budget/BudgetRepository.php+++ b/app/Repositories/Budget/BudgetRepository.php@@ -607,7 +607,7 @@ class BudgetRepository extends ComponentRepository implements BudgetRepositoryIn** @return array*/- public function spentPerDay(Budget $budget, Carbon $start, Carbon $end)+ public function spentPerDay(Budget $budget, Carbon $start, Carbon $end): array{/** @var Collection $query */$query = $budget->transactionjournals()diff --git a/app/Repositories/Budget/BudgetRepositoryInterface.php b/app/Repositories/Budget/BudgetRepositoryInterface.phpindex e3f00681b5..d6ab73938e 100644--- a/app/Repositories/Budget/BudgetRepositoryInterface.php+++ b/app/Repositories/Budget/BudgetRepositoryInterface.php@@ -221,7 +221,7 @@ interface BudgetRepositoryInterface** @return array*/- public function spentPerDay(Budget $budget, Carbon $start, Carbon $end);+ public function spentPerDay(Budget $budget, Carbon $start, Carbon $end): array;/*** @param array $datadiff --git a/config/app.php b/config/app.phpindex aa8b880314..963e49629e 100644--- a/config/app.php+++ b/config/app.php@@ -161,6 +161,7 @@ return [// own stuff:// Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class,+// Barryvdh\Debugbar\ServiceProvider::class,'DaveJamesMiller\Breadcrumbs\ServiceProvider','TwigBridge\ServiceProvider',diff --git a/database/seeds/TestDataSeeder.php b/database/seeds/TestDataSeeder.phpindex 663f5656e5..0983894137 100644--- a/database/seeds/TestDataSeeder.php+++ b/database/seeds/TestDataSeeder.php@@ -88,7 +88,7 @@ class TestDataSeeder extends SeederTestData::createBudgetLimit($user, $current, 'Bills', '1000');TestData::createBudgetLimit($user, $current, 'Car', '100');- echo 'Created test data for ' . $month . "\n";+ Log::info('Created test data for ' . $month);$current->addMonth();}}diff --git a/tests/BasicTest.php b/tests/BasicTest.phpindex 0511cc14b9..7bd632ca03 100644--- a/tests/BasicTest.php+++ b/tests/BasicTest.php@@ -4,7 +4,6 @@* Class BasicTest*/-/** @noinspection PhpUndefinedClassInspection */class BasicTest extends TestCase{/**diff --git a/tests/TestCase.php b/tests/TestCase.phpindex 83899cda8d..df6bace4ed 100644--- a/tests/TestCase.php+++ b/tests/TestCase.php@@ -7,7 +7,7 @@ use FireflyIII\User;* Class TestCase*/-/** @noinspection PhpUndefinedClassInspection */+class TestCase extends Illuminate\Foundation\Testing\TestCase{/**diff --git a/tests/acceptance/Controllers/Auth/AuthControllerTest.php b/tests/acceptance/Controllers/Auth/AuthControllerTest.phpindex dfe2c60576..8c97ee4abb 100644--- a/tests/acceptance/Controllers/Auth/AuthControllerTest.php+++ b/tests/acceptance/Controllers/Auth/AuthControllerTest.php@@ -11,7 +11,6 @@* Generated by PHPUnit_SkeletonGenerator on 2016-01-19 at 15:40:28.*/-/** @noinspection PhpUndefinedClassInspection */class AuthControllerTest extends TestCase{diff --git a/tests/acceptance/Controllers/Chart/ChartBudgetControllerTest.php b/tests/acceptance/Controllers/Chart/ChartBudgetControllerTest.phpindex ccdda57dd5..c5f05623ab 100644--- a/tests/acceptance/Controllers/Chart/ChartBudgetControllerTest.php+++ b/tests/acceptance/Controllers/Chart/ChartBudgetControllerTest.php@@ -24,7 +24,7 @@ class ChartBudgetControllerTest extends TestCase{$repository = $this->mock('FireflyIII\Repositories\Budget\BudgetRepositoryInterface');- $repository->shouldReceive('getExpensesPerMonth')->once()->andReturn(new Collection([new Budget]));+ $repository->shouldReceive('spentPerDay')->once()->andReturn([]);$repository->shouldReceive('getFirstBudgetLimitDate')->once()->andReturn(new Carbon);$this->be($this->user());diff --git a/tests/acceptance/Controllers/HomeControllerTest.php b/tests/acceptance/Controllers/HomeControllerTest.phpindex cbf285e6b4..9800585e23 100644--- a/tests/acceptance/Controllers/HomeControllerTest.php+++ b/tests/acceptance/Controllers/HomeControllerTest.php@@ -8,7 +8,6 @@* of the MIT license. See the LICENSE file for details.*/-/** @noinspection PhpUndefinedClassInspection */class HomeControllerTest extends TestCase{/**