From a26e8a5f830c46a726cf6f1c96f27f99bdac0927 Mon Sep 17 00:00:00 2001 From: James Cole Date: Fri, 5 Feb 2016 06:36:56 +0100 Subject: [PATCH] Added the $range argument to every test that might need it. See #170 --- tests/acceptance/Controllers/BillControllerTest.php | 6 +++--- .../acceptance/Controllers/BudgetControllerTest.php | 12 ++++++------ .../Controllers/CurrencyControllerTest.php | 2 +- tests/acceptance/Controllers/HomeControllerTest.php | 2 +- tests/acceptance/Controllers/JsonControllerTest.php | 12 ++++++------ .../Controllers/PiggyBankControllerTest.php | 6 +++--- .../Controllers/PreferencesControllerTest.php | 4 ++-- .../acceptance/Controllers/ReportControllerTest.php | 8 ++++---- .../Controllers/TransactionControllerTest.php | 4 ++-- 9 files changed, 28 insertions(+), 28 deletions(-) diff --git a/tests/acceptance/Controllers/BillControllerTest.php b/tests/acceptance/Controllers/BillControllerTest.php index d30195dfec..74246d4aba 100644 --- a/tests/acceptance/Controllers/BillControllerTest.php +++ b/tests/acceptance/Controllers/BillControllerTest.php @@ -60,7 +60,7 @@ class BillControllerTest extends TestCase /** * @covers FireflyIII\Http\Controllers\BillController::index */ - public function testIndex() + public function testIndex($range) { $this->be($this->user()); $this->call('GET', '/bills'); @@ -70,7 +70,7 @@ class BillControllerTest extends TestCase /** * @covers FireflyIII\Http\Controllers\BillController::rescan */ - public function testRescan() + public function testRescan($range) { $this->be($this->user()); $this->call('GET', '/bills/rescan/1'); @@ -81,7 +81,7 @@ class BillControllerTest extends TestCase /** * @covers FireflyIII\Http\Controllers\BillController::show */ - public function testShow() + public function testShow($range) { $this->be($this->user()); $this->call('GET', '/bills/show/1'); diff --git a/tests/acceptance/Controllers/BudgetControllerTest.php b/tests/acceptance/Controllers/BudgetControllerTest.php index defdab45ad..42ab7f5764 100644 --- a/tests/acceptance/Controllers/BudgetControllerTest.php +++ b/tests/acceptance/Controllers/BudgetControllerTest.php @@ -17,7 +17,7 @@ class BudgetControllerTest extends TestCase * @covers FireflyIII\Http\Controllers\BudgetController::amount * @covers FireflyIII\Http\Controllers\BudgetController::__construct */ - public function testAmount() + public function testAmount($range) { $args = [ 'amount' => 1200, @@ -74,7 +74,7 @@ class BudgetControllerTest extends TestCase /** * @covers FireflyIII\Http\Controllers\BudgetController::index */ - public function testIndex() + public function testIndex($range) { $this->be($this->user()); $this->call('GET', '/budgets'); @@ -84,7 +84,7 @@ class BudgetControllerTest extends TestCase /** * @covers FireflyIII\Http\Controllers\BudgetController::noBudget */ - public function testNoBudget() + public function testNoBudget($range) { $this->be($this->user()); $this->call('GET', '/budgets/list/noBudget'); @@ -94,7 +94,7 @@ class BudgetControllerTest extends TestCase /** * @covers FireflyIII\Http\Controllers\BudgetController::postUpdateIncome */ - public function testPostUpdateIncome() + public function testPostUpdateIncome($range) { $args = [ 'amount' => 1200, @@ -108,7 +108,7 @@ class BudgetControllerTest extends TestCase /** * @covers FireflyIII\Http\Controllers\BudgetController::show */ - public function testShow() + public function testShow($range) { $this->be($this->user()); $this->call('GET', '/budgets/show/1'); @@ -155,7 +155,7 @@ class BudgetControllerTest extends TestCase /** * @covers FireflyIII\Http\Controllers\BudgetController::updateIncome */ - public function testUpdateIncome() + public function testUpdateIncome($range) { $this->be($this->user()); $this->call('GET', '/budgets/income'); diff --git a/tests/acceptance/Controllers/CurrencyControllerTest.php b/tests/acceptance/Controllers/CurrencyControllerTest.php index ec4ce59ebd..9fe635883f 100644 --- a/tests/acceptance/Controllers/CurrencyControllerTest.php +++ b/tests/acceptance/Controllers/CurrencyControllerTest.php @@ -74,7 +74,7 @@ class CurrencyControllerTest extends TestCase /** * @covers FireflyIII\Http\Controllers\CurrencyController::index */ - public function testIndex() + public function testIndex($range) { $this->be($this->user()); $this->call('GET', '/currency'); diff --git a/tests/acceptance/Controllers/HomeControllerTest.php b/tests/acceptance/Controllers/HomeControllerTest.php index 299edd8274..a92a1ac315 100644 --- a/tests/acceptance/Controllers/HomeControllerTest.php +++ b/tests/acceptance/Controllers/HomeControllerTest.php @@ -43,7 +43,7 @@ class HomeControllerTest extends TestCase * @covers FireflyIII\Http\Controllers\HomeController::index * @covers FireflyIII\Http\Controllers\Controller::__construct */ - public function testIndex() + public function testIndex($range) { $this->be($this->user()); $this->call('GET', '/'); diff --git a/tests/acceptance/Controllers/JsonControllerTest.php b/tests/acceptance/Controllers/JsonControllerTest.php index 7454260e70..6910a46ca3 100644 --- a/tests/acceptance/Controllers/JsonControllerTest.php +++ b/tests/acceptance/Controllers/JsonControllerTest.php @@ -29,7 +29,7 @@ class JsonControllerTest extends TestCase /** * @covers FireflyIII\Http\Controllers\JsonController::boxBillsPaid */ - public function testBoxBillsPaid() + public function testBoxBillsPaid($range) { $this->be($this->user()); $this->call('GET', '/json/box/bills-paid'); @@ -39,7 +39,7 @@ class JsonControllerTest extends TestCase /** * @covers FireflyIII\Http\Controllers\JsonController::boxBillsUnpaid */ - public function testBoxBillsUnpaid() + public function testBoxBillsUnpaid($range) { $this->be($this->user()); $this->call('GET', '/json/box/bills-unpaid'); @@ -49,7 +49,7 @@ class JsonControllerTest extends TestCase /** * @covers FireflyIII\Http\Controllers\JsonController::boxIn */ - public function testBoxIn() + public function testBoxIn($range) { $this->be($this->user()); $this->call('GET', '/json/box/in'); @@ -59,7 +59,7 @@ class JsonControllerTest extends TestCase /** * @covers FireflyIII\Http\Controllers\JsonController::boxOut */ - public function testBoxOut() + public function testBoxOut($range) { $this->be($this->user()); $this->call('GET', '/json/box/out'); @@ -69,7 +69,7 @@ class JsonControllerTest extends TestCase /** * @covers FireflyIII\Http\Controllers\JsonController::categories */ - public function testCategories() + public function testCategories($range) { $this->be($this->user()); $this->call('GET', '/json/categories'); @@ -130,7 +130,7 @@ class JsonControllerTest extends TestCase /** * @covers FireflyIII\Http\Controllers\JsonController::transactionJournals */ - public function testTransactionJournals() + public function testTransactionJournals($range) { $type = factory(FireflyIII\Models\TransactionType::class)->make(); $repository = $this->mock('FireflyIII\Repositories\Journal\JournalRepositoryInterface'); diff --git a/tests/acceptance/Controllers/PiggyBankControllerTest.php b/tests/acceptance/Controllers/PiggyBankControllerTest.php index 611d205b2f..eae72120d1 100644 --- a/tests/acceptance/Controllers/PiggyBankControllerTest.php +++ b/tests/acceptance/Controllers/PiggyBankControllerTest.php @@ -17,7 +17,7 @@ class PiggyBankControllerTest extends TestCase * @covers FireflyIII\Http\Controllers\PiggyBankController::add * @covers FireflyIII\Http\Controllers\PiggyBankController::__construct */ - public function testAdd() + public function testAdd($range) { $this->be($this->user()); $this->call('GET', '/piggy-banks/add/1'); @@ -69,7 +69,7 @@ class PiggyBankControllerTest extends TestCase /** * @covers FireflyIII\Http\Controllers\PiggyBankController::index */ - public function testIndex() + public function testIndex($range) { $this->be($this->user()); $this->call('GET', '/piggy-banks'); @@ -134,7 +134,7 @@ class PiggyBankControllerTest extends TestCase /** * @covers FireflyIII\Http\Controllers\PiggyBankController::show */ - public function testShow() + public function testShow($range) { $this->be($this->user()); $this->call('GET', '/piggy-banks/show/1'); diff --git a/tests/acceptance/Controllers/PreferencesControllerTest.php b/tests/acceptance/Controllers/PreferencesControllerTest.php index 3b29a397e5..e1220058b6 100644 --- a/tests/acceptance/Controllers/PreferencesControllerTest.php +++ b/tests/acceptance/Controllers/PreferencesControllerTest.php @@ -28,11 +28,11 @@ class PreferencesControllerTest extends TestCase /** * @covers FireflyIII\Http\Controllers\PreferencesController::postIndex */ - public function testPostIndex() + public function testPostIndex($range) { $args = [ 'frontPageAccounts' => [1], - 'viewRange' => '1M', + 'viewRange' => $range, 'budgetMaximum' => 100, 'customFiscalYear' => 1, 'fiscalYearStart' => '01-01', diff --git a/tests/acceptance/Controllers/ReportControllerTest.php b/tests/acceptance/Controllers/ReportControllerTest.php index 36841ab232..ab8a00a858 100644 --- a/tests/acceptance/Controllers/ReportControllerTest.php +++ b/tests/acceptance/Controllers/ReportControllerTest.php @@ -21,7 +21,7 @@ class ReportControllerTest extends TestCase /** * @covers FireflyIII\Http\Controllers\ReportController::index */ - public function testIndex() + public function testIndex($range) { $this->be($this->user()); $this->call('GET', '/reports'); @@ -34,7 +34,7 @@ class ReportControllerTest extends TestCase * @covers FireflyIII\Http\Controllers\ReportController::report * @covers FireflyIII\Http\Controllers\ReportController::defaultMonth */ - public function testReportDefaultMonth() + public function testReportDefaultMonth($range) { // mock some stuff. $repository = $this->mock('FireflyIII\Helpers\Report\ReportHelperInterface'); @@ -53,7 +53,7 @@ class ReportControllerTest extends TestCase * @covers FireflyIII\Http\Controllers\ReportController::report * @covers FireflyIII\Http\Controllers\ReportController::defaultYear */ - public function testReportDefaultYear() + public function testReportDefaultYear($range) { $this->be($this->user()); $this->call('GET', '/reports/report/default/20160101/20161231/1,2'); @@ -64,7 +64,7 @@ class ReportControllerTest extends TestCase * @covers FireflyIII\Http\Controllers\ReportController::report * @covers FireflyIII\Http\Controllers\ReportController::defaultMultiYear */ - public function testReportDefaultMultiYear() + public function testReportDefaultMultiYear($range) { $this->be($this->user()); $this->call('GET', '/reports/report/default/20160101/20171231/1,2'); diff --git a/tests/acceptance/Controllers/TransactionControllerTest.php b/tests/acceptance/Controllers/TransactionControllerTest.php index 0d71d0134a..5a807df98d 100644 --- a/tests/acceptance/Controllers/TransactionControllerTest.php +++ b/tests/acceptance/Controllers/TransactionControllerTest.php @@ -61,7 +61,7 @@ class TransactionControllerTest extends TestCase /** * @covers FireflyIII\Http\Controllers\TransactionController::index */ - public function testIndex() + public function testIndex($range) { $this->be($this->user()); $this->call('GET', '/transactions/deposit'); @@ -85,7 +85,7 @@ class TransactionControllerTest extends TestCase /** * @covers FireflyIII\Http\Controllers\TransactionController::show */ - public function testShow() + public function testShow($range) { $this->be($this->user()); $this->call('GET', '/transaction/show/1');