Added the $range argument to every test that might need it. See #170

This commit is contained in:
James Cole
2016-02-05 06:36:56 +01:00
parent be74fbd677
commit a26e8a5f83
9 changed files with 28 additions and 28 deletions

View File

@@ -60,7 +60,7 @@ class BillControllerTest extends TestCase
/** /**
* @covers FireflyIII\Http\Controllers\BillController::index * @covers FireflyIII\Http\Controllers\BillController::index
*/ */
public function testIndex() public function testIndex($range)
{ {
$this->be($this->user()); $this->be($this->user());
$this->call('GET', '/bills'); $this->call('GET', '/bills');
@@ -70,7 +70,7 @@ class BillControllerTest extends TestCase
/** /**
* @covers FireflyIII\Http\Controllers\BillController::rescan * @covers FireflyIII\Http\Controllers\BillController::rescan
*/ */
public function testRescan() public function testRescan($range)
{ {
$this->be($this->user()); $this->be($this->user());
$this->call('GET', '/bills/rescan/1'); $this->call('GET', '/bills/rescan/1');
@@ -81,7 +81,7 @@ class BillControllerTest extends TestCase
/** /**
* @covers FireflyIII\Http\Controllers\BillController::show * @covers FireflyIII\Http\Controllers\BillController::show
*/ */
public function testShow() public function testShow($range)
{ {
$this->be($this->user()); $this->be($this->user());
$this->call('GET', '/bills/show/1'); $this->call('GET', '/bills/show/1');

View File

@@ -17,7 +17,7 @@ class BudgetControllerTest extends TestCase
* @covers FireflyIII\Http\Controllers\BudgetController::amount * @covers FireflyIII\Http\Controllers\BudgetController::amount
* @covers FireflyIII\Http\Controllers\BudgetController::__construct * @covers FireflyIII\Http\Controllers\BudgetController::__construct
*/ */
public function testAmount() public function testAmount($range)
{ {
$args = [ $args = [
'amount' => 1200, 'amount' => 1200,
@@ -74,7 +74,7 @@ class BudgetControllerTest extends TestCase
/** /**
* @covers FireflyIII\Http\Controllers\BudgetController::index * @covers FireflyIII\Http\Controllers\BudgetController::index
*/ */
public function testIndex() public function testIndex($range)
{ {
$this->be($this->user()); $this->be($this->user());
$this->call('GET', '/budgets'); $this->call('GET', '/budgets');
@@ -84,7 +84,7 @@ class BudgetControllerTest extends TestCase
/** /**
* @covers FireflyIII\Http\Controllers\BudgetController::noBudget * @covers FireflyIII\Http\Controllers\BudgetController::noBudget
*/ */
public function testNoBudget() public function testNoBudget($range)
{ {
$this->be($this->user()); $this->be($this->user());
$this->call('GET', '/budgets/list/noBudget'); $this->call('GET', '/budgets/list/noBudget');
@@ -94,7 +94,7 @@ class BudgetControllerTest extends TestCase
/** /**
* @covers FireflyIII\Http\Controllers\BudgetController::postUpdateIncome * @covers FireflyIII\Http\Controllers\BudgetController::postUpdateIncome
*/ */
public function testPostUpdateIncome() public function testPostUpdateIncome($range)
{ {
$args = [ $args = [
'amount' => 1200, 'amount' => 1200,
@@ -108,7 +108,7 @@ class BudgetControllerTest extends TestCase
/** /**
* @covers FireflyIII\Http\Controllers\BudgetController::show * @covers FireflyIII\Http\Controllers\BudgetController::show
*/ */
public function testShow() public function testShow($range)
{ {
$this->be($this->user()); $this->be($this->user());
$this->call('GET', '/budgets/show/1'); $this->call('GET', '/budgets/show/1');
@@ -155,7 +155,7 @@ class BudgetControllerTest extends TestCase
/** /**
* @covers FireflyIII\Http\Controllers\BudgetController::updateIncome * @covers FireflyIII\Http\Controllers\BudgetController::updateIncome
*/ */
public function testUpdateIncome() public function testUpdateIncome($range)
{ {
$this->be($this->user()); $this->be($this->user());
$this->call('GET', '/budgets/income'); $this->call('GET', '/budgets/income');

View File

@@ -74,7 +74,7 @@ class CurrencyControllerTest extends TestCase
/** /**
* @covers FireflyIII\Http\Controllers\CurrencyController::index * @covers FireflyIII\Http\Controllers\CurrencyController::index
*/ */
public function testIndex() public function testIndex($range)
{ {
$this->be($this->user()); $this->be($this->user());
$this->call('GET', '/currency'); $this->call('GET', '/currency');

View File

@@ -43,7 +43,7 @@ class HomeControllerTest extends TestCase
* @covers FireflyIII\Http\Controllers\HomeController::index * @covers FireflyIII\Http\Controllers\HomeController::index
* @covers FireflyIII\Http\Controllers\Controller::__construct * @covers FireflyIII\Http\Controllers\Controller::__construct
*/ */
public function testIndex() public function testIndex($range)
{ {
$this->be($this->user()); $this->be($this->user());
$this->call('GET', '/'); $this->call('GET', '/');

View File

@@ -29,7 +29,7 @@ class JsonControllerTest extends TestCase
/** /**
* @covers FireflyIII\Http\Controllers\JsonController::boxBillsPaid * @covers FireflyIII\Http\Controllers\JsonController::boxBillsPaid
*/ */
public function testBoxBillsPaid() public function testBoxBillsPaid($range)
{ {
$this->be($this->user()); $this->be($this->user());
$this->call('GET', '/json/box/bills-paid'); $this->call('GET', '/json/box/bills-paid');
@@ -39,7 +39,7 @@ class JsonControllerTest extends TestCase
/** /**
* @covers FireflyIII\Http\Controllers\JsonController::boxBillsUnpaid * @covers FireflyIII\Http\Controllers\JsonController::boxBillsUnpaid
*/ */
public function testBoxBillsUnpaid() public function testBoxBillsUnpaid($range)
{ {
$this->be($this->user()); $this->be($this->user());
$this->call('GET', '/json/box/bills-unpaid'); $this->call('GET', '/json/box/bills-unpaid');
@@ -49,7 +49,7 @@ class JsonControllerTest extends TestCase
/** /**
* @covers FireflyIII\Http\Controllers\JsonController::boxIn * @covers FireflyIII\Http\Controllers\JsonController::boxIn
*/ */
public function testBoxIn() public function testBoxIn($range)
{ {
$this->be($this->user()); $this->be($this->user());
$this->call('GET', '/json/box/in'); $this->call('GET', '/json/box/in');
@@ -59,7 +59,7 @@ class JsonControllerTest extends TestCase
/** /**
* @covers FireflyIII\Http\Controllers\JsonController::boxOut * @covers FireflyIII\Http\Controllers\JsonController::boxOut
*/ */
public function testBoxOut() public function testBoxOut($range)
{ {
$this->be($this->user()); $this->be($this->user());
$this->call('GET', '/json/box/out'); $this->call('GET', '/json/box/out');
@@ -69,7 +69,7 @@ class JsonControllerTest extends TestCase
/** /**
* @covers FireflyIII\Http\Controllers\JsonController::categories * @covers FireflyIII\Http\Controllers\JsonController::categories
*/ */
public function testCategories() public function testCategories($range)
{ {
$this->be($this->user()); $this->be($this->user());
$this->call('GET', '/json/categories'); $this->call('GET', '/json/categories');
@@ -130,7 +130,7 @@ class JsonControllerTest extends TestCase
/** /**
* @covers FireflyIII\Http\Controllers\JsonController::transactionJournals * @covers FireflyIII\Http\Controllers\JsonController::transactionJournals
*/ */
public function testTransactionJournals() public function testTransactionJournals($range)
{ {
$type = factory(FireflyIII\Models\TransactionType::class)->make(); $type = factory(FireflyIII\Models\TransactionType::class)->make();
$repository = $this->mock('FireflyIII\Repositories\Journal\JournalRepositoryInterface'); $repository = $this->mock('FireflyIII\Repositories\Journal\JournalRepositoryInterface');

View File

@@ -17,7 +17,7 @@ class PiggyBankControllerTest extends TestCase
* @covers FireflyIII\Http\Controllers\PiggyBankController::add * @covers FireflyIII\Http\Controllers\PiggyBankController::add
* @covers FireflyIII\Http\Controllers\PiggyBankController::__construct * @covers FireflyIII\Http\Controllers\PiggyBankController::__construct
*/ */
public function testAdd() public function testAdd($range)
{ {
$this->be($this->user()); $this->be($this->user());
$this->call('GET', '/piggy-banks/add/1'); $this->call('GET', '/piggy-banks/add/1');
@@ -69,7 +69,7 @@ class PiggyBankControllerTest extends TestCase
/** /**
* @covers FireflyIII\Http\Controllers\PiggyBankController::index * @covers FireflyIII\Http\Controllers\PiggyBankController::index
*/ */
public function testIndex() public function testIndex($range)
{ {
$this->be($this->user()); $this->be($this->user());
$this->call('GET', '/piggy-banks'); $this->call('GET', '/piggy-banks');
@@ -134,7 +134,7 @@ class PiggyBankControllerTest extends TestCase
/** /**
* @covers FireflyIII\Http\Controllers\PiggyBankController::show * @covers FireflyIII\Http\Controllers\PiggyBankController::show
*/ */
public function testShow() public function testShow($range)
{ {
$this->be($this->user()); $this->be($this->user());
$this->call('GET', '/piggy-banks/show/1'); $this->call('GET', '/piggy-banks/show/1');

View File

@@ -28,11 +28,11 @@ class PreferencesControllerTest extends TestCase
/** /**
* @covers FireflyIII\Http\Controllers\PreferencesController::postIndex * @covers FireflyIII\Http\Controllers\PreferencesController::postIndex
*/ */
public function testPostIndex() public function testPostIndex($range)
{ {
$args = [ $args = [
'frontPageAccounts' => [1], 'frontPageAccounts' => [1],
'viewRange' => '1M', 'viewRange' => $range,
'budgetMaximum' => 100, 'budgetMaximum' => 100,
'customFiscalYear' => 1, 'customFiscalYear' => 1,
'fiscalYearStart' => '01-01', 'fiscalYearStart' => '01-01',

View File

@@ -21,7 +21,7 @@ class ReportControllerTest extends TestCase
/** /**
* @covers FireflyIII\Http\Controllers\ReportController::index * @covers FireflyIII\Http\Controllers\ReportController::index
*/ */
public function testIndex() public function testIndex($range)
{ {
$this->be($this->user()); $this->be($this->user());
$this->call('GET', '/reports'); $this->call('GET', '/reports');
@@ -34,7 +34,7 @@ class ReportControllerTest extends TestCase
* @covers FireflyIII\Http\Controllers\ReportController::report * @covers FireflyIII\Http\Controllers\ReportController::report
* @covers FireflyIII\Http\Controllers\ReportController::defaultMonth * @covers FireflyIII\Http\Controllers\ReportController::defaultMonth
*/ */
public function testReportDefaultMonth() public function testReportDefaultMonth($range)
{ {
// mock some stuff. // mock some stuff.
$repository = $this->mock('FireflyIII\Helpers\Report\ReportHelperInterface'); $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::report
* @covers FireflyIII\Http\Controllers\ReportController::defaultYear * @covers FireflyIII\Http\Controllers\ReportController::defaultYear
*/ */
public function testReportDefaultYear() public function testReportDefaultYear($range)
{ {
$this->be($this->user()); $this->be($this->user());
$this->call('GET', '/reports/report/default/20160101/20161231/1,2'); $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::report
* @covers FireflyIII\Http\Controllers\ReportController::defaultMultiYear * @covers FireflyIII\Http\Controllers\ReportController::defaultMultiYear
*/ */
public function testReportDefaultMultiYear() public function testReportDefaultMultiYear($range)
{ {
$this->be($this->user()); $this->be($this->user());
$this->call('GET', '/reports/report/default/20160101/20171231/1,2'); $this->call('GET', '/reports/report/default/20160101/20171231/1,2');

View File

@@ -61,7 +61,7 @@ class TransactionControllerTest extends TestCase
/** /**
* @covers FireflyIII\Http\Controllers\TransactionController::index * @covers FireflyIII\Http\Controllers\TransactionController::index
*/ */
public function testIndex() public function testIndex($range)
{ {
$this->be($this->user()); $this->be($this->user());
$this->call('GET', '/transactions/deposit'); $this->call('GET', '/transactions/deposit');
@@ -85,7 +85,7 @@ class TransactionControllerTest extends TestCase
/** /**
* @covers FireflyIII\Http\Controllers\TransactionController::show * @covers FireflyIII\Http\Controllers\TransactionController::show
*/ */
public function testShow() public function testShow($range)
{ {
$this->be($this->user()); $this->be($this->user());
$this->call('GET', '/transaction/show/1'); $this->call('GET', '/transaction/show/1');