New tests

This commit is contained in:
James Cole
2016-12-10 07:29:36 +01:00
parent e7845115f6
commit 0fe0de1a7f
17 changed files with 141 additions and 282 deletions

View File

@@ -43,6 +43,7 @@ class Navigation
'1M' => 'addMonths', 'month' => 'addMonths', 'monthly' => 'addMonths', '3M' => 'addMonths',
'quarter' => 'addMonths', 'quarterly' => 'addMonths', '6M' => 'addMonths', 'half-year' => 'addMonths',
'year' => 'addYears', 'yearly' => 'addYears', '1Y' => 'addYears',
'custom' => 'addMonths', // custom? just add one month.
];
$modifierMap = [
'quarter' => 3,

View File

@@ -255,10 +255,9 @@ Route::group(
Route::group(
['middleware' => 'user-full-auth', 'namespace' => 'Chart', 'prefix' => 'chart/budget', 'as' => 'chart.budget.'], function () {
Route::get('frontpage', ['uses' => 'BudgetController@frontpage']);
Route::get('period/0/{accountList}/{start_date}/{end_date}', ['uses' => 'BudgetController@periodNoBudget']);
Route::get('period/{budget}/{accountList}/{start_date}/{end_date}', ['uses' => 'BudgetController@period']);
Route::get('frontpage', ['uses' => 'BudgetController@frontpage', 'as' => 'frontpage']);
Route::get('period/0/{accountList}/{start_date}/{end_date}', ['uses' => 'BudgetController@periodNoBudget', 'as' => 'period.no-budget']);
Route::get('period/{budget}/{accountList}/{start_date}/{end_date}', ['uses' => 'BudgetController@period', 'as' => 'period']);
Route::get('budget/{budget}/{limitrepetition}', ['uses' => 'BudgetController@budgetLimit', 'as' => 'budget-limit']);
Route::get('budget/{budget}', ['uses' => 'BudgetController@budget', 'as' => 'budget']);
@@ -272,12 +271,11 @@ Route::group(
['middleware' => 'user-full-auth', 'namespace' => 'Chart', 'prefix' => 'chart/category', 'as' => 'chart.category.'], function () {
Route::get('frontpage', ['uses' => 'CategoryController@frontpage']);
Route::get('period/{category}', ['uses' => 'CategoryController@currentPeriod', 'as' => 'current']);
Route::get('period/{category}/{date}', ['uses' => 'CategoryController@specificPeriod', 'as' => 'specific']);
Route::get('all/{category}', ['uses' => 'CategoryController@all', 'as' => 'all']);
Route::get('report-period/0/{accountList}/{start_date}/{end_date}', ['uses' => 'CategoryController@reportPeriodNoCategory']);
Route::get('report-period/{category}/{accountList}/{start_date}/{end_date}', ['uses' => 'CategoryController@reportPeriod']);
Route::get('report-period/0/{accountList}/{start_date}/{end_date}', ['uses' => 'CategoryController@reportPeriodNoCategory', 'as' => 'period.no-category']);
Route::get('report-period/{category}/{accountList}/{start_date}/{end_date}', ['uses' => 'CategoryController@reportPeriod', 'as' => 'period']);
// these charts are used in reports (category reports):
Route::get(
@@ -297,8 +295,10 @@ Route::group(
['uses' => 'CategoryReportController@accountExpense', 'as' => 'account-expense']
);
Route::get('report-in-out/{accountList}/{categoryList}/{start_date}/{end_date}',
['uses' => 'CategoryReportController@mainChart', 'as' => 'main']);
Route::get(
'report-in-out/{accountList}/{categoryList}/{start_date}/{end_date}',
['uses' => 'CategoryReportController@mainChart', 'as' => 'main']
);
}
);
@@ -307,8 +307,8 @@ Route::group(
* Chart\PiggyBank Controller
*/
Route::group(
['middleware' => 'user-full-auth', 'namespace' => 'Chart', 'prefix' => 'chart/piggy-bank'], function () {
Route::get('{piggyBank}', ['uses' => 'PiggyBankController@history']);
['middleware' => 'user-full-auth', 'namespace' => 'Chart', 'prefix' => 'chart/piggy-bank','as'=> 'chart.piggy-bank.'], function () {
Route::get('{piggyBank}', ['uses' => 'PiggyBankController@history','as' => 'history']);
}
);

View File

@@ -35,7 +35,6 @@ class ConfigurationControllerTest extends TestCase
/**
* @covers \FireflyIII\Http\Controllers\Admin\ConfigurationController::index
* Implement testIndex().
*/
public function testIndex()
{
@@ -60,7 +59,6 @@ class ConfigurationControllerTest extends TestCase
/**
* @covers \FireflyIII\Http\Controllers\Admin\ConfigurationController::store
* Implement testStore().
*/
public function testPostIndex()
{
@@ -74,12 +72,4 @@ class ConfigurationControllerTest extends TestCase
$this->assertSessionHas('success');
$this->assertResponseStatus(302);
}
/**
* Tears down the fixture, for example, closes a network connection.
* This method is called after a test is executed.
*/
protected function tearDown()
{
}
}

View File

@@ -31,7 +31,6 @@ class DomainControllerTest extends TestCase
/**
* @covers \FireflyIII\Http\Controllers\Admin\DomainController::domains
* Implement testDomains().
*/
public function testDomains()
{
@@ -46,7 +45,6 @@ class DomainControllerTest extends TestCase
/**
* @covers \FireflyIII\Http\Controllers\Admin\DomainController::manual
* Implement testManual().
*/
public function testManual()
{
@@ -58,7 +56,6 @@ class DomainControllerTest extends TestCase
/**
* @covers \FireflyIII\Http\Controllers\Admin\DomainController::toggleDomain
* Implement testToggleDomain().
*/
public function testToggleDomain()
{
@@ -68,11 +65,4 @@ class DomainControllerTest extends TestCase
$this->assertResponseStatus(302);
}
/**
* Tears down the fixture, for example, closes a network connection.
* This method is called after a test is executed.
*/
protected function tearDown()
{
}
}

View File

@@ -31,7 +31,6 @@ class HomeControllerTest extends TestCase
/**
* @covers \FireflyIII\Http\Controllers\Admin\HomeController::index
* Implement testIndex().
*/
public function testIndex()
{
@@ -42,11 +41,4 @@ class HomeControllerTest extends TestCase
$this->see('<ol class="breadcrumb">');
}
/**
* Tears down the fixture, for example, closes a network connection.
* This method is called after a test is executed.
*/
protected function tearDown()
{
}
}

View File

@@ -31,7 +31,6 @@ class UserControllerTest extends TestCase
/**
* @covers \FireflyIII\Http\Controllers\Admin\UserController::edit
* Implement testEdit().
*/
public function testEdit()
{
@@ -44,7 +43,6 @@ class UserControllerTest extends TestCase
/**
* @covers \FireflyIII\Http\Controllers\Admin\UserController::index
* Implement testIndex().
*/
public function testIndex()
{
@@ -57,7 +55,6 @@ class UserControllerTest extends TestCase
/**
* @covers \FireflyIII\Http\Controllers\Admin\UserController::show
* Implement testShow().
*/
public function testShow()
{
@@ -68,11 +65,4 @@ class UserControllerTest extends TestCase
$this->see('<ol class="breadcrumb">');
}
/**
* Tears down the fixture, for example, closes a network connection.
* This method is called after a test is executed.
*/
protected function tearDown()
{
}
}

View File

@@ -35,7 +35,6 @@ class ConfirmationControllerTest extends TestCase
/**
* @covers \FireflyIII\Http\Controllers\Auth\ConfirmationController::confirmationError
* Implement testConfirmationError().
*/
public function testConfirmationError()
{
@@ -59,7 +58,6 @@ class ConfirmationControllerTest extends TestCase
/**
* @covers \FireflyIII\Http\Controllers\Auth\ConfirmationController::doConfirmation
* Implement testDoConfirmation().
*/
public function testDoConfirmation()
{
@@ -84,7 +82,6 @@ class ConfirmationControllerTest extends TestCase
/**
* @covers \FireflyIII\Http\Controllers\Auth\ConfirmationController::resendConfirmation
* Implement testResendConfirmation().
*/
public function testResendConfirmation()
{
@@ -111,11 +108,4 @@ class ConfirmationControllerTest extends TestCase
$this->assertResponseStatus(200);
}
/**
* Tears down the fixture, for example, closes a network connection.
* This method is called after a test is executed.
*/
protected function tearDown()
{
}
}

View File

@@ -31,7 +31,6 @@ class LoginControllerTest extends TestCase
/**
* @covers \FireflyIII\Http\Controllers\Auth\LoginController::login
* Implement testLogin().
*/
public function testLogin()
{
@@ -45,7 +44,6 @@ class LoginControllerTest extends TestCase
/**
* @covers \FireflyIII\Http\Controllers\Auth\LoginController::logout
* Implement testLogout().
*/
public function testLogout()
{
@@ -56,7 +54,6 @@ class LoginControllerTest extends TestCase
/**
* @covers \FireflyIII\Http\Controllers\Auth\LoginController::showLoginForm
* Implement testShowLoginForm().
*/
public function testShowLoginForm()
{
@@ -64,12 +61,4 @@ class LoginControllerTest extends TestCase
->seePageIs('/login')
->see('Sign in to start your session');
}
/**
* Tears down the fixture, for example, closes a network connection.
* This method is called after a test is executed.
*/
protected function tearDown()
{
}
}

View File

@@ -34,7 +34,6 @@ class TwoFactorControllerTest extends TestCase
/**
* @covers \FireflyIII\Http\Controllers\Auth\TwoFactorController::index
* Implement testIndex().
*/
public function testIndex()
{
@@ -54,7 +53,6 @@ class TwoFactorControllerTest extends TestCase
/**
* @covers \FireflyIII\Http\Controllers\Auth\TwoFactorController::lostTwoFactor
* Implement testLostTwoFactor().
*/
public function testLostTwoFactor()
{
@@ -72,11 +70,4 @@ class TwoFactorControllerTest extends TestCase
$this->assertResponseStatus(200);
}
/**
* Tears down the fixture, for example, closes a network connection.
* This method is called after a test is executed.
*/
protected function tearDown()
{
}
}

View File

@@ -31,73 +31,78 @@ class AccountControllerTest extends TestCase
/**
* @covers \FireflyIII\Http\Controllers\Chart\AccountController::expenseAccounts
* Implement testExpenseAccounts().
* @dataProvider dateRangeProvider
*/
public function testExpenseAccounts()
public function testExpenseAccounts(string $range)
{
$this->be($this->user());
$this->changeDateRange($this->user(), $range);
$this->call('get', route('chart.account.expense'));
$this->assertResponseStatus(200);
}
/**
* @covers \FireflyIII\Http\Controllers\Chart\AccountController::expenseBudget
* Implement testExpenseBudget().
* @dataProvider dateRangeProvider
*/
public function testExpenseBudget()
public function testExpenseBudget(string $range)
{
$this->be($this->user());
$this->changeDateRange($this->user(), $range);
$this->call('get', route('chart.account.expense-budget', [1, '20120101', '20120131']));
$this->assertResponseStatus(200);
}
/**
* @covers \FireflyIII\Http\Controllers\Chart\AccountController::expenseCategory
* Implement testExpenseCategory().
* @dataProvider dateRangeProvider
*/
public function testExpenseCategory()
public function testExpenseCategory(string $range)
{
$this->be($this->user());
$this->changeDateRange($this->user(), $range);
$this->call('get', route('chart.account.expense-category', [1, '20120101', '20120131']));
$this->assertResponseStatus(200);
}
/**
* @covers \FireflyIII\Http\Controllers\Chart\AccountController::frontpage
* Implement testFrontpage().
* @dataProvider dateRangeProvider
*/
public function testFrontpage()
public function testFrontpage(string $range)
{
$this->be($this->user());
$this->changeDateRange($this->user(), $range);
$this->call('get', route('chart.account.frontpage'));
$this->assertResponseStatus(200);
}
/**
* @covers \FireflyIII\Http\Controllers\Chart\AccountController::incomeCategory
* Implement testIncomeCategory().
* @dataProvider dateRangeProvider
*/
public function testIncomeCategory()
public function testIncomeCategory(string $range)
{
$this->be($this->user());
$this->changeDateRange($this->user(), $range);
$this->call('get', route('chart.account.income-category', [1, '20120101', '20120131']));
$this->assertResponseStatus(200);
}
/**
* @covers \FireflyIII\Http\Controllers\Chart\AccountController::period
* Implement testSpecificPeriod().
* @dataProvider dateRangeProvider
*/
public function testPeriod()
public function testPeriod(string $range)
{
$this->be($this->user());
$this->changeDateRange($this->user(), $range);
$this->call('get', route('chart.account.period', [1, '2012-01-01']));
$this->assertResponseStatus(200);
}
/**
* @covers \FireflyIII\Http\Controllers\Chart\AccountController::report
* Implement testReport().
*/
public function testReport()
{
@@ -108,31 +113,26 @@ class AccountControllerTest extends TestCase
/**
* @covers \FireflyIII\Http\Controllers\Chart\AccountController::revenueAccounts
* Implement testRevenueAccounts().
* @dataProvider dateRangeProvider
*/
public function testRevenueAccounts()
public function testRevenueAccounts(string $range)
{
$this->be($this->user());
$this->changeDateRange($this->user(), $range);
$this->call('get', route('chart.account.revenue'));
$this->assertResponseStatus(200);
}
/**
* @covers \FireflyIII\Http\Controllers\Chart\AccountController::single
* Implement testSingle().
* @dataProvider dateRangeProvider
*/
public function testSingle()
public function testSingle(string $range)
{
$this->be($this->user());
$this->changeDateRange($this->user(), $range);
$this->call('get', route('chart.account.single', [1]));
$this->assertResponseStatus(200);
}
/**
* Tears down the fixture, for example, closes a network connection.
* This method is called after a test is executed.
*/
protected function tearDown()
{
}
}

View File

@@ -31,33 +31,24 @@ class BillControllerTest extends TestCase
/**
* @covers \FireflyIII\Http\Controllers\Chart\BillController::frontpage
* Implement testFrontpage().
* @dataProvider dateRangeProvider
*/
public function testFrontpage()
public function testFrontpage(string $range)
{
// Remove the following lines when you implement this test.
$this->markTestIncomplete(
'This test has not been implemented yet.'
);
$this->be($this->user());
$this->changeDateRange($this->user(), $range);
$this->call('get', route('chart.bill.frontpage'));
$this->assertResponseStatus(200);
}
/**
* @covers \FireflyIII\Http\Controllers\Chart\BillController::single
* Implement testSingle().
*/
public function testSingle()
{
// Remove the following lines when you implement this test.
$this->markTestIncomplete(
'This test has not been implemented yet.'
);
$this->be($this->user());
$this->call('get', route('chart.bill.single', [1]));
$this->assertResponseStatus(200);
}
/**
* Tears down the fixture, for example, closes a network connection.
* This method is called after a test is executed.
*/
protected function tearDown()
{
}
}

View File

@@ -31,69 +31,57 @@ class BudgetControllerTest extends TestCase
/**
* @covers \FireflyIII\Http\Controllers\Chart\BudgetController::budget
* Implement testBudget().
* @dataProvider dateRangeProvider
*/
public function testBudget()
public function testBudget(string $range)
{
// Remove the following lines when you implement this test.
$this->markTestIncomplete(
'This test has not been implemented yet.'
);
$this->be($this->user());
$this->changeDateRange($this->user(), $range);
$this->call('get', route('chart.budget.budget', [1]));
$this->assertResponseStatus(200);
}
/**
* @covers \FireflyIII\Http\Controllers\Chart\BudgetController::budgetLimit
* Implement testBudgetLimit().
* @dataProvider dateRangeProvider
*/
public function testBudgetLimit()
public function testBudgetLimit(string $range)
{
// Remove the following lines when you implement this test.
$this->markTestIncomplete(
'This test has not been implemented yet.'
);
$this->be($this->user());
$this->changeDateRange($this->user(), $range);
$this->call('get', route('chart.budget.budget', [1,1]));
$this->assertResponseStatus(200);
}
/**
* @covers \FireflyIII\Http\Controllers\Chart\BudgetController::frontpage
* Implement testFrontpage().
* @dataProvider dateRangeProvider
*/
public function testFrontpage()
public function testFrontpage(string $range)
{
// Remove the following lines when you implement this test.
$this->markTestIncomplete(
'This test has not been implemented yet.'
);
$this->be($this->user());
$this->changeDateRange($this->user(), $range);
$this->call('get', route('chart.budget.frontpage'));
$this->assertResponseStatus(200);
}
/**
* @covers \FireflyIII\Http\Controllers\Chart\BudgetController::period
* Implement testPeriod().
*/
public function testPeriod()
{
// Remove the following lines when you implement this test.
$this->markTestIncomplete(
'This test has not been implemented yet.'
);
$this->be($this->user());
$this->call('get', route('chart.budget.period', [1,'1','20120101','20120131']));
$this->assertResponseStatus(200);
}
/**
* @covers \FireflyIII\Http\Controllers\Chart\BudgetController::periodNoBudget
* Implement testPeriodNoBudget().
*/
public function testPeriodNoBudget()
{
// Remove the following lines when you implement this test.
$this->markTestIncomplete(
'This test has not been implemented yet.'
);
}
/**
* Tears down the fixture, for example, closes a network connection.
* This method is called after a test is executed.
*/
protected function tearDown()
{
$this->be($this->user());
$this->call('get', route('chart.budget.period.no-budget', ['1','20120101','20120131']));
$this->assertResponseStatus(200);
}
}

View File

@@ -31,81 +31,69 @@ class CategoryControllerTest extends TestCase
/**
* @covers \FireflyIII\Http\Controllers\Chart\CategoryController::all
* Implement testAll().
* @dataProvider dateRangeProvider
*/
public function testAll()
public function testAll(string $range)
{
// Remove the following lines when you implement this test.
$this->markTestIncomplete(
'This test has not been implemented yet.'
);
$this->be($this->user());
$this->changeDateRange($this->user(), $range);
$this->call('get', route('chart.category.all', [1]));
$this->assertResponseStatus(200);
}
/**
* @covers \FireflyIII\Http\Controllers\Chart\CategoryController::currentPeriod
* Implement testCurrentPeriod().
* @dataProvider dateRangeProvider
*/
public function testCurrentPeriod()
public function testCurrentPeriod(string $range)
{
// Remove the following lines when you implement this test.
$this->markTestIncomplete(
'This test has not been implemented yet.'
);
$this->be($this->user());
$this->changeDateRange($this->user(), $range);
$this->call('get', route('chart.category.current', [1]));
$this->assertResponseStatus(200);
}
/**
* @covers \FireflyIII\Http\Controllers\Chart\CategoryController::frontpage
* Implement testFrontpage().
* @dataProvider dateRangeProvider
*/
public function testFrontpage()
public function testFrontpage(string $range)
{
// Remove the following lines when you implement this test.
$this->markTestIncomplete(
'This test has not been implemented yet.'
);
$this->be($this->user());
$this->changeDateRange($this->user(), $range);
$this->call('get', route('chart.category.current', [1]));
$this->assertResponseStatus(200);
}
/**
* @covers \FireflyIII\Http\Controllers\Chart\CategoryController::reportPeriod
* Implement testReportPeriod().
*/
public function testReportPeriod()
{
// Remove the following lines when you implement this test.
$this->markTestIncomplete(
'This test has not been implemented yet.'
);
$this->be($this->user());
$this->call('get', route('chart.category.period', [1, '1', '20120101', '20120131']));
$this->assertResponseStatus(200);
}
/**
* @covers \FireflyIII\Http\Controllers\Chart\CategoryController::reportPeriodNoCategory
* Implement testReportPeriodNoCategory().
*/
public function testReportPeriodNoCategory()
{
// Remove the following lines when you implement this test.
$this->markTestIncomplete(
'This test has not been implemented yet.'
);
$this->be($this->user());
$this->call('get', route('chart.category.period.no-category', ['1', '20120101', '20120131']));
$this->assertResponseStatus(200);
}
/**
* @covers \FireflyIII\Http\Controllers\Chart\CategoryController::specificPeriod
* Implement testSpecificPeriod().
* @dataProvider dateRangeProvider
*/
public function testSpecificPeriod()
{
// Remove the following lines when you implement this test.
$this->markTestIncomplete(
'This test has not been implemented yet.'
);
}
/**
* Tears down the fixture, for example, closes a network connection.
* This method is called after a test is executed.
*/
protected function tearDown()
public function testSpecificPeriod(string $range)
{
$this->be($this->user());
$this->changeDateRange($this->user(), $range);
$this->call('get', route('chart.category.specific', ['1', '2012-01-01']));
$this->assertResponseStatus(200);
}
}

View File

@@ -31,69 +31,52 @@ class CategoryReportControllerTest extends TestCase
/**
* @covers \FireflyIII\Http\Controllers\Chart\CategoryReportController::accountExpense
* Implement testAccountExpense().
*/
public function testAccountExpense()
{
// Remove the following lines when you implement this test.
$this->markTestIncomplete(
'This test has not been implemented yet.'
);
$this->be($this->user());
$this->call('get', route('chart.category.account-expense', ['1', '1', '20120101', '20120131', 0]));
$this->assertResponseStatus(200);
}
/**
* @covers \FireflyIII\Http\Controllers\Chart\CategoryReportController::accountIncome
* Implement testAccountIncome().
*/
public function testAccountIncome()
{
// Remove the following lines when you implement this test.
$this->markTestIncomplete(
'This test has not been implemented yet.'
);
$this->be($this->user());
$this->call('get', route('chart.category.account-income', ['1', '1', '20120101', '20120131', 0]));
$this->assertResponseStatus(200);
}
/**
* @covers \FireflyIII\Http\Controllers\Chart\CategoryReportController::categoryExpense
* Implement testCategoryExpense().
*/
public function testCategoryExpense()
{
// Remove the following lines when you implement this test.
$this->markTestIncomplete(
'This test has not been implemented yet.'
);
$this->be($this->user());
$this->call('get', route('chart.category.category-expense', ['1', '1', '20120101', '20120131', 0]));
$this->assertResponseStatus(200);
}
/**
* @covers \FireflyIII\Http\Controllers\Chart\CategoryReportController::categoryIncome
* Implement testCategoryIncome().
*/
public function testCategoryIncome()
{
// Remove the following lines when you implement this test.
$this->markTestIncomplete(
'This test has not been implemented yet.'
);
$this->be($this->user());
$this->call('get', route('chart.category.category-income', ['1', '1', '20120101', '20120131', 0]));
$this->assertResponseStatus(200);
}
/**
* @covers \FireflyIII\Http\Controllers\Chart\CategoryReportController::mainChart
* Implement testMainChart().
*/
public function testMainChart()
{
// Remove the following lines when you implement this test.
$this->markTestIncomplete(
'This test has not been implemented yet.'
);
$this->be($this->user());
$this->call('get', route('chart.category.main', ['1', '1', '20120101', '20120131']));
$this->assertResponseStatus(200);
}
/**
* Tears down the fixture, for example, closes a network connection.
* This method is called after a test is executed.
*/
protected function tearDown()
{
}
}

View File

@@ -31,21 +31,11 @@ class PiggyBankControllerTest extends TestCase
/**
* @covers \FireflyIII\Http\Controllers\Chart\PiggyBankController::history
* Implement testHistory().
*/
public function testHistory()
{
// Remove the following lines when you implement this test.
$this->markTestIncomplete(
'This test has not been implemented yet.'
);
}
/**
* Tears down the fixture, for example, closes a network connection.
* This method is called after a test is executed.
*/
protected function tearDown()
{
$this->be($this->user());
$this->call('get', route('chart.piggy-bank.history', [1]));
$this->assertResponseStatus(200);
}
}

View File

@@ -31,45 +31,31 @@ class ReportControllerTest extends TestCase
/**
* @covers \FireflyIII\Http\Controllers\Chart\ReportController::netWorth
* Implement testNetWorth().
*/
public function testNetWorth()
{
// Remove the following lines when you implement this test.
$this->markTestIncomplete(
'This test has not been implemented yet.'
);
$this->be($this->user());
$this->call('get', route('chart.report.net-worth', [1, '20120101', '20120131']));
$this->assertResponseStatus(200);
}
/**
* @covers \FireflyIII\Http\Controllers\Chart\ReportController::operations
* Implement testOperations().
*/
public function testOperations()
{
// Remove the following lines when you implement this test.
$this->markTestIncomplete(
'This test has not been implemented yet.'
);
$this->be($this->user());
$this->call('get', route('chart.report.operations', [1, '20120101', '20120131']));
$this->assertResponseStatus(200);
}
/**
* @covers \FireflyIII\Http\Controllers\Chart\ReportController::sum
* Implement testSum().
*/
public function testSum()
{
// Remove the following lines when you implement this test.
$this->markTestIncomplete(
'This test has not been implemented yet.'
);
}
/**
* Tears down the fixture, for example, closes a network connection.
* This method is called after a test is executed.
*/
protected function tearDown()
{
$this->be($this->user());
$this->call('get', route('chart.report.sum', [1, '20120101', '20120131']));
$this->assertResponseStatus(200);
}
}

View File

@@ -58,7 +58,7 @@ class HomeControllerTest extends TestCase
*
* @param $range
*/
public function testIndex($range)
public function testIndex(string $range)
{
$this->be($this->user());
$this->changeDateRange($this->user(), $range);