Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
More cleanup.
James Colea013553a6cf5
diff --git a/tests/acceptance/Controllers/AccountControllerTest.php b/tests/acceptance/Controllers/AccountControllerTest.phpindex 05513ca2e4..e38518d2f2 100644--- a/tests/acceptance/Controllers/AccountControllerTest.php+++ b/tests/acceptance/Controllers/AccountControllerTest.php@@ -18,8 +18,8 @@ class AccountControllerTest extends TestCasepublic function testCreate(){$this->be($this->user());- $response = $this->call('GET', '/accounts/create/asset');- $this->assertEquals(200, $response->status());+ $this->call('GET', '/accounts/create/asset');+ $this->assertResponseStatus(200);}/**@@ -28,8 +28,8 @@ class AccountControllerTest extends TestCasepublic function testDelete(){$this->be($this->user());- $response = $this->call('GET', '/accounts/delete/1');- $this->assertEquals(200, $response->status());+ $this->call('GET', '/accounts/delete/1');+ $this->assertResponseStatus(200);}/**@@ -39,9 +39,9 @@ class AccountControllerTest extends TestCase{$this->be($this->user());$this->session(['accounts.delete.url' => 'http://localhost']);- $response = $this->call('POST', '/accounts/destroy/6');+ $this->call('POST', '/accounts/destroy/6');$this->assertSessionHas('success');- $this->assertEquals(302, $response->status());+ $this->assertResponseStatus(302);}/**@@ -50,8 +50,8 @@ class AccountControllerTest extends TestCasepublic function testEdit(){$this->be($this->user());- $response = $this->call('GET', '/accounts/edit/1');- $this->assertEquals(200, $response->status());+ $this->call('GET', '/accounts/edit/1');+ $this->assertResponseStatus(200);}/**@@ -61,8 +61,8 @@ class AccountControllerTest extends TestCasepublic function testIndex(){$this->be($this->user());- $response = $this->call('GET', '/accounts/asset');- $this->assertEquals(200, $response->status());+ $this->call('GET', '/accounts/asset');+ $this->assertResponseStatus(200);}/**@@ -71,8 +71,8 @@ class AccountControllerTest extends TestCasepublic function testShow(){$this->be($this->user());- $response = $this->call('GET', '/accounts/show/1');- $this->assertEquals(200, $response->status());+ $this->call('GET', '/accounts/show/1');+ $this->assertResponseStatus(200);}/**@@ -89,8 +89,8 @@ class AccountControllerTest extends TestCase'amount_currency_id_openingBalance' => 1,];- $response = $this->call('POST', '/accounts/store', $args);- $this->assertEquals(302, $response->status());+ $this->call('POST', '/accounts/store', $args);+ $this->assertResponseStatus(302);$this->assertSessionHas('success');}@@ -108,8 +108,9 @@ class AccountControllerTest extends TestCase];$this->be($this->user());- $response = $this->call('POST', '/accounts/update/1', $args);- $this->assertEquals(302, $response->status());+ $this->call('POST', '/accounts/update/1', $args);+ $this->assertResponseStatus(302);+$this->assertSessionHas('success');}diff --git a/tests/acceptance/Controllers/AttachmentControllerTest.php b/tests/acceptance/Controllers/AttachmentControllerTest.phpindex 8fb2923d92..6ad10b9bb2 100644--- a/tests/acceptance/Controllers/AttachmentControllerTest.php+++ b/tests/acceptance/Controllers/AttachmentControllerTest.php@@ -19,8 +19,8 @@ class AttachmentControllerTest extends TestCasepublic function testDelete(){$this->be($this->user());- $response = $this->call('GET', '/attachment/delete/1');- $this->assertEquals(200, $response->status());+ $this->call('GET', '/attachment/delete/1');+ $this->assertResponseStatus(200);}/**@@ -30,8 +30,8 @@ class AttachmentControllerTest extends TestCase{$this->be($this->user());$this->session(['attachments.delete.url' => 'http://localhost']);- $response = $this->call('POST', '/attachment/destroy/2');- $this->assertEquals(302, $response->status());+ $this->call('POST', '/attachment/destroy/2');+ $this->assertResponseStatus(302);}/**@@ -40,8 +40,8 @@ class AttachmentControllerTest extends TestCasepublic function testDownload(){$this->be($this->user());- $response = $this->call('GET', '/attachment/download/1');- $this->assertEquals(200, $response->status());+ $this->call('GET', '/attachment/download/1');+ $this->assertResponseStatus(200);}/**@@ -50,8 +50,8 @@ class AttachmentControllerTest extends TestCasepublic function testEdit(){$this->be($this->user());- $response = $this->call('GET', '/attachment/edit/1');- $this->assertEquals(200, $response->status());+ $this->call('GET', '/attachment/edit/1');+ $this->assertResponseStatus(200);}/**@@ -60,8 +60,8 @@ class AttachmentControllerTest extends TestCasepublic function testPreview(){$this->be($this->user());- $response = $this->call('GET', '/attachment/preview/1');- $this->assertEquals(200, $response->status());+ $this->call('GET', '/attachment/preview/1');+ $this->assertResponseStatus(200);}/**@@ -78,8 +78,8 @@ class AttachmentControllerTest extends TestCase];$this->be($this->user());- $response = $this->call('POST', '/attachment/update/1', $args);- $this->assertEquals(302, $response->status());+ $this->call('POST', '/attachment/update/1', $args);+ $this->assertResponseStatus(302);$this->assertSessionHas('success');}}diff --git a/tests/acceptance/Controllers/Auth/AuthControllerTest.php b/tests/acceptance/Controllers/Auth/AuthControllerTest.phpindex 32b235619e..0631aee89f 100644--- a/tests/acceptance/Controllers/Auth/AuthControllerTest.php+++ b/tests/acceptance/Controllers/Auth/AuthControllerTest.php@@ -18,8 +18,8 @@ class AuthControllerTest extends TestCase*/public function testGetLogin(){- $response = $this->call('GET', '/login');- $this->assertEquals(200, $response->status());+ $this->call('GET', '/login');+ $this->assertResponseStatus(200);}/**@@ -28,8 +28,8 @@ class AuthControllerTest extends TestCasepublic function testGetLogout(){$this->be($this->user());- $response = $this->call('GET', '/logout');- $this->assertEquals(302, $response->status());+ $this->call('GET', '/logout');+ $this->assertResponseStatus(302);}/**@@ -37,8 +37,8 @@ class AuthControllerTest extends TestCase*/public function testGetRegister(){- $response = $this->call('GET', '/register');- $this->assertEquals(200, $response->status());+ $this->call('GET', '/register');+ $this->assertResponseStatus(200);}/**@@ -46,8 +46,8 @@ class AuthControllerTest extends TestCase*/public function testLogin(){- $response = $this->call('GET', '/login');- $this->assertEquals(200, $response->status());+ $this->call('GET', '/login');+ $this->assertResponseStatus(200);}/**@@ -56,11 +56,12 @@ class AuthControllerTest extends TestCasepublic function testLogout(){$this->be($this->user());- $response = $this->call('GET', '/logout');- $this->assertEquals(302, $response->status());+ $this->call('GET', '/logout');+ $this->assertResponseStatus(302);+// index should now redirect:- $response = $this->call('GET', '/');- $this->assertEquals(302, $response->status());+ $this->call('GET', '/');+ $this->assertResponseStatus(302);}@@ -75,11 +76,11 @@ class AuthControllerTest extends TestCase'password' => 'james','remember' => 1,];- $response = $this->call('POST', '/login', $args);- $this->assertEquals(302, $response->status());+ $this->call('POST', '/login', $args);+ $this->assertResponseStatus(302);- $response = $this->call('GET', '/');- $this->assertEquals(200, $response->status());+ $this->call('GET', '/');+ $this->assertResponseStatus(200);}@@ -94,8 +95,8 @@ class AuthControllerTest extends TestCase'password' => 'james123','password_confirmation' => 'james123',];- $response = $this->call('POST', '/register', $args);- $this->assertEquals(302, $response->status());+ $this->call('POST', '/register', $args);+ $this->assertResponseStatus(302);$this->assertSessionHas('start');}@@ -104,7 +105,7 @@ class AuthControllerTest extends TestCase*/public function testRegister(){- $response = $this->call('GET', '/register');- $this->assertEquals(200, $response->status());+ $this->call('GET', '/register');+ $this->assertResponseStatus(200);}}diff --git a/tests/acceptance/Controllers/Auth/PasswordControllerTest.php b/tests/acceptance/Controllers/Auth/PasswordControllerTest.phpindex 6369fe0bb0..ed82798e4f 100644--- a/tests/acceptance/Controllers/Auth/PasswordControllerTest.php+++ b/tests/acceptance/Controllers/Auth/PasswordControllerTest.php@@ -20,8 +20,8 @@ class PasswordControllerTest extends TestCase$args = ['email' => '[email protected]',];- $response = $this->call('POST', '/password/email', $args);- $this->assertEquals(302, $response->status());+ $this->call('POST', '/password/email', $args);+ $this->assertResponseStatus(302);}}diff --git a/tests/acceptance/Controllers/BillControllerTest.php b/tests/acceptance/Controllers/BillControllerTest.phpindex d905af39ba..9917620b5b 100644--- a/tests/acceptance/Controllers/BillControllerTest.php+++ b/tests/acceptance/Controllers/BillControllerTest.php@@ -20,8 +20,8 @@ class BillControllerTest extends TestCasepublic function testCreate(){$this->be($this->user());- $response = $this->call('GET', '/bills/create');- $this->assertEquals(200, $response->status());+ $this->call('GET', '/bills/create');+ $this->assertResponseStatus(200);}/**@@ -31,8 +31,8 @@ class BillControllerTest extends TestCasepublic function testDelete(){$this->be($this->user());- $response = $this->call('GET', '/bills/delete/1');- $this->assertEquals(200, $response->status());+ $this->call('GET', '/bills/delete/1');+ $this->assertResponseStatus(200);}/**@@ -42,9 +42,9 @@ class BillControllerTest extends TestCase{$this->session(['bills.delete.url' => 'http://localhost']);$this->be($this->user());- $response = $this->call('POST', '/bills/destroy/2');+ $this->call('POST', '/bills/destroy/2');$this->assertSessionHas('success');- $this->assertEquals(302, $response->status());+ $this->assertResponseStatus(302);}/**@@ -53,8 +53,8 @@ class BillControllerTest extends TestCasepublic function testEdit(){$this->be($this->user());- $response = $this->call('GET', '/bills/edit/1');- $this->assertEquals(200, $response->status());+ $this->call('GET', '/bills/edit/1');+ $this->assertResponseStatus(200);}/**@@ -63,8 +63,8 @@ class BillControllerTest extends TestCasepublic function testIndex(){$this->be($this->user());- $response = $this->call('GET', '/bills');- $this->assertEquals(200, $response->status());+ $this->call('GET', '/bills');+ $this->assertResponseStatus(200);}/**@@ -73,9 +73,9 @@ class BillControllerTest extends TestCasepublic function testRescan(){$this->be($this->user());- $response = $this->call('GET', '/bills/rescan/1');+ $this->call('GET', '/bills/rescan/1');$this->assertSessionHas('success');- $this->assertEquals(302, $response->status());+ $this->assertResponseStatus(302);}/**@@ -84,8 +84,8 @@ class BillControllerTest extends TestCasepublic function testShow(){$this->be($this->user());- $response = $this->call('GET', '/bills/show/1');- $this->assertEquals(200, $response->status());+ $this->call('GET', '/bills/show/1');+ $this->assertResponseStatus(200);}/**@@ -107,10 +107,10 @@ class BillControllerTest extends TestCase];$this->be($this->user());- $response = $this->call('POST', '/bills/store', $args);+ $this->call('POST', '/bills/store', $args);$this->assertSessionHas('success');- $this->assertEquals(302, $response->status());+ $this->assertResponseStatus(302);}/**@@ -133,9 +133,9 @@ class BillControllerTest extends TestCase];$this->be($this->user());- $response = $this->call('POST', '/bills/update/1', $args);+ $this->call('POST', '/bills/update/1', $args);$this->assertSessionHas('success');- $this->assertEquals(302, $response->status());+ $this->assertResponseStatus(302);}}diff --git a/tests/acceptance/Controllers/BudgetControllerTest.php b/tests/acceptance/Controllers/BudgetControllerTest.phpindex a0dfeaadd5..806805cb0f 100644--- a/tests/acceptance/Controllers/BudgetControllerTest.php+++ b/tests/acceptance/Controllers/BudgetControllerTest.php@@ -23,8 +23,8 @@ class BudgetControllerTest extends TestCase];$this->be($this->user());- $response = $this->call('POST', '/budgets/amount/1', $args);- $this->assertEquals(200, $response->status());+ $this->call('POST', '/budgets/amount/1', $args);+ $this->assertResponseStatus(200);}/**@@ -33,8 +33,8 @@ class BudgetControllerTest extends TestCasepublic function testCreate(){$this->be($this->user());- $response = $this->call('GET', '/budgets/create');- $this->assertEquals(200, $response->status());+ $this->call('GET', '/budgets/create');+ $this->assertResponseStatus(200);}/**@@ -43,8 +43,8 @@ class BudgetControllerTest extends TestCasepublic function testDelete(){$this->be($this->user());- $response = $this->call('GET', '/budgets/delete/1');- $this->assertEquals(200, $response->status());+ $this->call('GET', '/budgets/delete/1');+ $this->assertResponseStatus(200);}/**@@ -55,9 +55,9 @@ class BudgetControllerTest extends TestCase$this->be($this->user());$this->session(['budgets.delete.url' => 'http://localhost']);- $response = $this->call('POST', '/budgets/destroy/2');+ $this->call('POST', '/budgets/destroy/2');$this->assertSessionHas('success');- $this->assertEquals(302, $response->status());+ $this->assertResponseStatus(302);}/**@@ -66,8 +66,8 @@ class BudgetControllerTest extends TestCasepublic function testEdit(){$this->be($this->user());- $response = $this->call('GET', '/budgets/edit/1');- $this->assertEquals(200, $response->status());+ $this->call('GET', '/budgets/edit/1');+ $this->assertResponseStatus(200);}/**@@ -76,8 +76,8 @@ class BudgetControllerTest extends TestCasepublic function testIndex(){$this->be($this->user());- $response = $this->call('GET', '/budgets');- $this->assertEquals(200, $response->status());+ $this->call('GET', '/budgets');+ $this->assertResponseStatus(200);}/**@@ -86,8 +86,8 @@ class BudgetControllerTest extends TestCasepublic function testNoBudget(){$this->be($this->user());- $response = $this->call('GET', '/budgets/list/noBudget');- $this->assertEquals(200, $response->status());+ $this->call('GET', '/budgets/list/noBudget');+ $this->assertResponseStatus(200);}/**@@ -100,8 +100,8 @@ class BudgetControllerTest extends TestCase];$this->be($this->user());- $response = $this->call('POST', '/budgets/income', $args);- $this->assertEquals(302, $response->status());+ $this->call('POST', '/budgets/income', $args);+ $this->assertResponseStatus(302);}/**@@ -110,8 +110,8 @@ class BudgetControllerTest extends TestCasepublic function testShow(){$this->be($this->user());- $response = $this->call('GET', '/budgets/show/1');- $this->assertEquals(200, $response->status());+ $this->call('GET', '/budgets/show/1');+ $this->assertResponseStatus(200);}/**@@ -125,8 +125,8 @@ class BudgetControllerTest extends TestCase'name' => 'Some kind of test budget.',];- $response = $this->call('POST', '/budgets/store', $args);- $this->assertEquals(302, $response->status());+ $this->call('POST', '/budgets/store', $args);+ $this->assertResponseStatus(302);$this->assertSessionHas('success');}@@ -141,8 +141,8 @@ class BudgetControllerTest extends TestCase'name' => 'Some kind of test budget.',];- $response = $this->call('POST', '/budgets/update/1', $args);- $this->assertEquals(302, $response->status());+ $this->call('POST', '/budgets/update/1', $args);+ $this->assertResponseStatus(302);$this->assertSessionHas('success');}@@ -152,7 +152,7 @@ class BudgetControllerTest extends TestCasepublic function testUpdateIncome(){$this->be($this->user());- $response = $this->call('GET', '/budgets/income');- $this->assertEquals(200, $response->status());+ $this->call('GET', '/budgets/income');+ $this->assertResponseStatus(200);}}diff --git a/tests/acceptance/Controllers/CategoryControllerTest.php b/tests/acceptance/Controllers/CategoryControllerTest.phpindex e8c90c78ae..2d2bb291e3 100644--- a/tests/acceptance/Controllers/CategoryControllerTest.php+++ b/tests/acceptance/Controllers/CategoryControllerTest.php@@ -20,8 +20,8 @@ class CategoryControllerTest extends TestCasepublic function testCreate(){$this->be($this->user());- $response = $this->call('GET', '/categories/create');- $this->assertEquals(200, $response->status());+ $this->call('GET', '/categories/create');+ $this->assertResponseStatus(200);}/**@@ -30,8 +30,8 @@ class CategoryControllerTest extends TestCasepublic function testDelete(){$this->be($this->user());- $response = $this->call('GET', '/categories/delete/1');- $this->assertEquals(200, $response->status());+ $this->call('GET', '/categories/delete/1');+ $this->assertResponseStatus(200);}/**@@ -43,9 +43,9 @@ class CategoryControllerTest extends TestCase$this->session(['categories.delete.url' => 'http://localhost']);- $response = $this->call('POST', '/categories/destroy/2');+ $this->call('POST', '/categories/destroy/2');$this->assertSessionHas('success');- $this->assertEquals(302, $response->status());+ $this->assertResponseStatus(302);}/**@@ -54,8 +54,8 @@ class CategoryControllerTest extends TestCasepublic function testEdit(){$this->be($this->user());- $response = $this->call('GET', '/categories/edit/1');- $this->assertEquals(200, $response->status());+ $this->call('GET', '/categories/edit/1');+ $this->assertResponseStatus(200);}/**@@ -64,8 +64,8 @@ class CategoryControllerTest extends TestCasepublic function testIndex(){$this->be($this->user());- $response = $this->call('GET', '/categories');- $this->assertEquals(200, $response->status());+ $this->call('GET', '/categories');+ $this->assertResponseStatus(200);}/**@@ -74,8 +74,8 @@ class CategoryControllerTest extends TestCasepublic function testNoCategory(){$this->be($this->user());- $response = $this->call('GET', '/categories/list/noCategory');- $this->assertEquals(200, $response->status());+ $this->call('GET', '/categories/list/noCategory');+ $this->assertResponseStatus(200);}/**@@ -85,8 +85,8 @@ class CategoryControllerTest extends TestCasepublic function testShow(){$this->be($this->user());- $response = $this->call('GET', '/categories/show/1');- $this->assertEquals(200, $response->status());+ $this->call('GET', '/categories/show/1');+ $this->assertResponseStatus(200);}@@ -96,8 +96,8 @@ class CategoryControllerTest extends TestCasepublic function testShowWithDate(){$this->be($this->user());- $response = $this->call('GET', '/categories/show/1/20150101');- $this->assertEquals(200, $response->status());+ $this->call('GET', '/categories/show/1/20150101');+ $this->assertResponseStatus(200);}/**@@ -111,8 +111,8 @@ class CategoryControllerTest extends TestCase'name' => 'Some kind of test cat.',];- $response = $this->call('POST', '/categories/store', $args);- $this->assertEquals(302, $response->status());+ $this->call('POST', '/categories/store', $args);+ $this->assertResponseStatus(302);$this->assertSessionHas('success');}@@ -127,8 +127,8 @@ class CategoryControllerTest extends TestCase'name' => 'Some kind of test category.',];- $response = $this->call('POST', '/categories/update/1', $args);- $this->assertEquals(302, $response->status());+ $this->call('POST', '/categories/update/1', $args);+ $this->assertResponseStatus(302);$this->assertSessionHas('success');}}diff --git a/tests/acceptance/Controllers/Chart/ChartAccountControllerTest.php b/tests/acceptance/Controllers/Chart/ChartAccountControllerTest.phpindex 29dd51e769..4f02f165f8 100644--- a/tests/acceptance/Controllers/Chart/ChartAccountControllerTest.php+++ b/tests/acceptance/Controllers/Chart/ChartAccountControllerTest.php@@ -18,9 +18,9 @@ class ChartAccountControllerTest extends TestCasepublic function testExpenseAccounts(){$this->be($this->user());- $response = $this->call('GET', '/chart/account/expense');+ $this->call('GET', '/chart/account/expense');- $this->assertEquals(200, $response->status());+ $this->assertResponseStatus(200);}/**@@ -29,9 +29,9 @@ class ChartAccountControllerTest extends TestCasepublic function testFrontpage(){$this->be($this->user());- $response = $this->call('GET', '/chart/account/frontpage');+ $this->call('GET', '/chart/account/frontpage');- $this->assertEquals(200, $response->status());+ $this->assertResponseStatus(200);}/**@@ -40,9 +40,9 @@ class ChartAccountControllerTest extends TestCasepublic function testReport(){$this->be($this->user());- $response = $this->call('GET', '/chart/account/report/default/20160101/20160131/1');+ $this->call('GET', '/chart/account/report/default/20160101/20160131/1');- $this->assertEquals(200, $response->status());+ $this->assertResponseStatus(200);}/**@@ -51,8 +51,8 @@ class ChartAccountControllerTest extends TestCasepublic function testSingle(){$this->be($this->user());- $response = $this->call('GET', '/chart/account/1');+ $this->call('GET', '/chart/account/1');- $this->assertEquals(200, $response->status());+ $this->assertResponseStatus(200);}}diff --git a/tests/acceptance/Controllers/Chart/ChartBillControllerTest.php b/tests/acceptance/Controllers/Chart/ChartBillControllerTest.phpindex e35e5a2d54..97fb4704eb 100644--- a/tests/acceptance/Controllers/Chart/ChartBillControllerTest.php+++ b/tests/acceptance/Controllers/Chart/ChartBillControllerTest.php@@ -19,9 +19,9 @@ class ChartBillControllerTest extends TestCasepublic function testFrontpage(){$this->be($this->user());- $response = $this->call('GET', '/chart/bill/frontpage');+ $this->call('GET', '/chart/bill/frontpage');- $this->assertEquals(200, $response->status());+ $this->assertResponseStatus(200);}/**@@ -30,8 +30,8 @@ class ChartBillControllerTest extends TestCasepublic function testSingle(){$this->be($this->user());- $response = $this->call('GET', '/chart/bill/1');+ $this->call('GET', '/chart/bill/1');- $this->assertEquals(200, $response->status());+ $this->assertResponseStatus(200);}}diff --git a/tests/acceptance/Controllers/Chart/ChartBudgetControllerTest.php b/tests/acceptance/Controllers/Chart/ChartBudgetControllerTest.phpindex 2e16d198af..51371da772 100644--- a/tests/acceptance/Controllers/Chart/ChartBudgetControllerTest.php+++ b/tests/acceptance/Controllers/Chart/ChartBudgetControllerTest.php@@ -27,8 +27,8 @@ class ChartBudgetControllerTest extends TestCase$repository->shouldReceive('getFirstBudgetLimitDate')->once()->andReturn(new Carbon);$this->be($this->user());- $response = $this->call('GET', '/chart/budget/1');- $this->assertEquals(200, $response->status());+ $this->call('GET', '/chart/budget/1');+ $this->assertResponseStatus(200);//$this->markTestSkipped('Skipped because sqlite does not support DATE_FORMAT.');}@@ -38,9 +38,9 @@ class ChartBudgetControllerTest extends TestCasepublic function testBudgetLimit(){$this->be($this->user());- $response = $this->call('GET', '/chart/budget/1/1');+ $this->call('GET', '/chart/budget/1/1');- $this->assertEquals(200, $response->status());+ $this->assertResponseStatus(200);}/**@@ -49,9 +49,9 @@ class ChartBudgetControllerTest extends TestCasepublic function testFrontpage(){$this->be($this->user());- $response = $this->call('GET', '/chart/budget/frontpage');+ $this->call('GET', '/chart/budget/frontpage');- $this->assertEquals(200, $response->status());+ $this->assertResponseStatus(200);}/**@@ -70,8 +70,8 @@ class ChartBudgetControllerTest extends TestCase$repository->shouldReceive('getBudgetsAndExpensesPerYear')->once()->andReturn([]);$this->be($this->user());- $response = $this->call('GET', '/chart/budget/multi-year/default/20150101/20160101/1/1');- $this->assertEquals(200, $response->status());+ $this->call('GET', '/chart/budget/multi-year/default/20150101/20160101/1/1');+ $this->assertResponseStatus(200);}@@ -84,8 +84,8 @@ class ChartBudgetControllerTest extends TestCase$repository->shouldReceive('getBudgetsAndExpensesPerMonth')->once()->andReturn([]);$this->be($this->user());- $response = $this->call('GET', '/chart/budget/year/default/20150101/20151231/1');- $this->assertEquals(200, $response->status());+ $this->call('GET', '/chart/budget/year/default/20150101/20151231/1');+ $this->assertResponseStatus(200);}}diff --git a/tests/acceptance/Controllers/Chart/ChartCategoryControllerTest.php b/tests/acceptance/Controllers/Chart/ChartCategoryControllerTest.phpindex d10eee721a..0a6ccb44b0 100644--- a/tests/acceptance/Controllers/Chart/ChartCategoryControllerTest.php+++ b/tests/acceptance/Controllers/Chart/ChartCategoryControllerTest.php@@ -20,9 +20,9 @@ class ChartCategoryControllerTest extends TestCasepublic function testAll(){$this->be($this->user());- $response = $this->call('GET', '/chart/category/1/all');+ $this->call('GET', '/chart/category/1/all');- $this->assertEquals(200, $response->status());+ $this->assertResponseStatus(200);}/**@@ -31,9 +31,9 @@ class ChartCategoryControllerTest extends TestCasepublic function testCurrentPeriod(){$this->be($this->user());- $response = $this->call('GET', '/chart/category/1/period');+ $this->call('GET', '/chart/category/1/period');- $this->assertEquals(200, $response->status());+ $this->assertResponseStatus(200);}/**@@ -45,8 +45,8 @@ class ChartCategoryControllerTest extends TestCase$repository->shouldReceive('earnedForAccountsPerMonth')->once()->andReturn(new Collection);$this->be($this->user());- $response = $this->call('GET', '/chart/category/earned-in-period/default/20150101/20151231/1');- $this->assertEquals(200, $response->status());+ $this->call('GET', '/chart/category/earned-in-period/default/20150101/20151231/1');+ $this->assertResponseStatus(200);}/**@@ -59,8 +59,8 @@ class ChartCategoryControllerTest extends TestCase$repository->shouldReceive('sumSpentNoCategory')->once()->andReturn('120');$this->be($this->user());- $response = $this->call('GET', '/chart/category/frontpage');- $this->assertEquals(200, $response->status());+ $this->call('GET', '/chart/category/frontpage');+ $this->assertResponseStatus(200);}/**@@ -72,8 +72,8 @@ class ChartCategoryControllerTest extends TestCase$repository->shouldReceive('listMultiYear')->once()->andReturn(new Collection);$this->be($this->user());- $response = $this->call('GET', '/chart/category/multi-year/default/20150101/20151231/1/1');- $this->assertEquals(200, $response->status());+ $this->call('GET', '/chart/category/multi-year/default/20150101/20151231/1/1');+ $this->assertResponseStatus(200);}/**@@ -82,9 +82,9 @@ class ChartCategoryControllerTest extends TestCasepublic function testSpecificPeriod(){$this->be($this->user());- $response = $this->call('GET', '/chart/category/1/period/20150101');+ $this->call('GET', '/chart/category/1/period/20150101');- $this->assertEquals(200, $response->status());+ $this->assertResponseStatus(200);}/**@@ -98,8 +98,8 @@ class ChartCategoryControllerTest extends TestCase$repository->shouldReceive('spentForAccountsPerMonth')->once()->andReturn(new Collection);$this->be($this->user());- $response = $this->call('GET', '/chart/category/spent-in-period/default/20150101/20151231/1');- $this->assertEquals(200, $response->status());+ $this->call('GET', '/chart/category/spent-in-period/default/20150101/20151231/1');+ $this->assertResponseStatus(200);}}diff --git a/tests/acceptance/Controllers/Chart/ChartPiggyBankControllerTest.php b/tests/acceptance/Controllers/Chart/ChartPiggyBankControllerTest.phpindex a7f0e7e6fd..ce3ae5beba 100644--- a/tests/acceptance/Controllers/Chart/ChartPiggyBankControllerTest.php+++ b/tests/acceptance/Controllers/Chart/ChartPiggyBankControllerTest.php@@ -19,7 +19,7 @@ class ChartPiggyBankControllerTest extends TestCasepublic function testHistory(){$this->be($this->user());- $response = $this->call('GET', '/chart/piggy-bank/1');- $this->assertEquals(200, $response->status());+ $this->call('GET', '/chart/piggy-bank/1');+ $this->assertResponseStatus(200);}}diff --git a/tests/acceptance/Controllers/Chart/ChartReportControllerTest.php b/tests/acceptance/Controllers/Chart/ChartReportControllerTest.phpindex 9de5b324bc..93fdba8cd1 100644--- a/tests/acceptance/Controllers/Chart/ChartReportControllerTest.php+++ b/tests/acceptance/Controllers/Chart/ChartReportControllerTest.php@@ -22,8 +22,8 @@ class ChartReportControllerTest extends TestCase$repository->shouldReceive('earnedPerMonth')->once()->andReturn([]);$this->be($this->user());- $response = $this->call('GET', '/chart/report/in-out/default/20150101/20151231/1');- $this->assertEquals(200, $response->status());+ $this->call('GET', '/chart/report/in-out/default/20150101/20151231/1');+ $this->assertResponseStatus(200);}/**@@ -36,7 +36,7 @@ class ChartReportControllerTest extends TestCase$repository->shouldReceive('earnedPerMonth')->once()->andReturn([]);$this->be($this->user());- $response = $this->call('GET', '/chart/report/in-out-sum/default/20150101/20151231/1');- $this->assertEquals(200, $response->status());+ $this->call('GET', '/chart/report/in-out-sum/default/20150101/20151231/1');+ $this->assertResponseStatus(200);}}diff --git a/tests/acceptance/Controllers/CsvControllerTest.php b/tests/acceptance/Controllers/CsvControllerTest.phpindex 84300209a6..9b46be9a58 100644--- a/tests/acceptance/Controllers/CsvControllerTest.php+++ b/tests/acceptance/Controllers/CsvControllerTest.php@@ -24,9 +24,9 @@ class CsvControllerTest extends TestCase// create session data:$this->session($this->getSessionData());- $response = $this->call('GET', '/csv/column_roles');+ $this->call('GET', '/csv/column_roles');- $this->assertEquals(200, $response->status());+ $this->assertResponseStatus(200);}/**@@ -36,8 +36,8 @@ class CsvControllerTest extends TestCase{$this->be($this->user());$this->session($this->getSessionData());- $response = $this->call('GET', '/csv/download-config');- $this->assertEquals(200, $response->status());+ $this->call('GET', '/csv/download-config');+ $this->assertResponseStatus(200);}/**@@ -47,8 +47,8 @@ class CsvControllerTest extends TestCase{$this->be($this->user());$this->session($this->getSessionData());- $response = $this->call('GET', '/csv/download');- $this->assertEquals(200, $response->status());+ $this->call('GET', '/csv/download');+ $this->assertResponseStatus(200);}/**@@ -58,8 +58,8 @@ class CsvControllerTest extends TestCase{$this->be($this->user());- $response = $this->call('GET', '/csv');- $this->assertEquals(200, $response->status());+ $this->call('GET', '/csv');+ $this->assertResponseStatus(200);}/**@@ -86,9 +86,9 @@ class CsvControllerTest extends TestCase$this->session($this->getSessionData());- $response = $this->call('POST', '/csv/initial_parse', $postData);+ $this->call('POST', '/csv/initial_parse', $postData);// should be redirect- $this->assertEquals(302, $response->status());+ $this->assertResponseStatus(302);// should be redirected to mapping:$this->assertRedirectedToRoute('csv.map');@@ -118,9 +118,9 @@ class CsvControllerTest extends TestCase$this->session($this->getSessionData());- $response = $this->call('POST', '/csv/initial_parse', $postData);+ $this->call('POST', '/csv/initial_parse', $postData);// should be redirect- $this->assertEquals(302, $response->status());+ $this->assertResponseStatus(302);// should be redirected to download config:$this->assertRedirectedToRoute('csv.download-config-page');@@ -135,8 +135,8 @@ class CsvControllerTest extends TestCase$this->session($this->getSessionData());- $response = $this->call('GET', '/csv/map');- $this->assertEquals(200, $response->status());+ $this->call('GET', '/csv/map');+ $this->assertResponseStatus(200);}@@ -147,8 +147,8 @@ class CsvControllerTest extends TestCase{$this->be($this->user());$this->session($this->getSessionData());- $response = $this->call('GET', '/csv/process');- $this->assertEquals(200, $response->status());+ $this->call('GET', '/csv/process');+ $this->assertResponseStatus(200);}/**@@ -175,9 +175,9 @@ class CsvControllerTest extends TestCase'NL81LEJP9477634344' => '0', 'NL14JYVJ1041891180' => '0', 'NL57SPBS0788124528' => '0','NL96DZCO4665940223' => '2',],],];- $response = $this->call('POST', '/csv/save_mapping', $postData);+ $this->call('POST', '/csv/save_mapping', $postData);- $this->assertEquals(302, $response->status());+ $this->assertResponseStatus(302);$this->assertRedirectedToRoute('csv.download-config-page');}@@ -195,7 +195,7 @@ class CsvControllerTest extends TestCase'csv_import_account' => 1,];- $response = $this->call('POST', '/csv/upload', $args, [], ['csv' => $file]);+ $this->call('POST', '/csv/upload', $args, [], ['csv' => $file]);// csv data set://$this->assertSessionHas('csv-file', 'abc');@@ -208,7 +208,7 @@ class CsvControllerTest extends TestCase$this->assertSessionHas('csv-import-account', 1);$this->assertSessionHas('csv-delimiter', ',');- $this->assertEquals(302, $response->status());+ $this->assertResponseStatus(302);}/**diff --git a/tests/acceptance/Controllers/CurrencyControllerTest.php b/tests/acceptance/Controllers/CurrencyControllerTest.phpindex 618979d963..eafd8d193e 100644--- a/tests/acceptance/Controllers/CurrencyControllerTest.php+++ b/tests/acceptance/Controllers/CurrencyControllerTest.php@@ -20,8 +20,8 @@ class CurrencyControllerTest extends TestCasepublic function testCreate(){$this->be($this->user());- $response = $this->call('GET', '/currency/create');- $this->assertEquals(200, $response->status());+ $this->call('GET', '/currency/create');+ $this->assertResponseStatus(200);}/**@@ -30,8 +30,8 @@ class CurrencyControllerTest extends TestCasepublic function testDefaultCurrency(){$this->be($this->user());- $response = $this->call('GET', '/currency/default/2');- $this->assertEquals(302, $response->status());+ $this->call('GET', '/currency/default/2');+ $this->assertResponseStatus(302);$this->assertRedirectedToRoute('currency.index');$this->assertSessionHas('success');}@@ -42,8 +42,8 @@ class CurrencyControllerTest extends TestCasepublic function testDelete(){$this->be($this->user());- $response = $this->call('GET', '/currency/delete/2');- $this->assertEquals(200, $response->status());+ $this->call('GET', '/currency/delete/2');+ $this->assertResponseStatus(200);}/**@@ -53,10 +53,10 @@ class CurrencyControllerTest extends TestCase{$this->session(['currency.delete.url' => 'http://localhost/currency']);$this->be($this->user());- $response = $this->call('POST', '/currency/destroy/3');+ $this->call('POST', '/currency/destroy/3');$this->assertSessionHas('success');$this->assertRedirectedToRoute('currency.index');- $this->assertEquals(302, $response->status());+ $this->assertResponseStatus(302);}/**@@ -65,8 +65,8 @@ class CurrencyControllerTest extends TestCasepublic function testEdit(){$this->be($this->user());- $response = $this->call('GET', '/currency/edit/2');- $this->assertEquals(200, $response->status());+ $this->call('GET', '/currency/edit/2');+ $this->assertResponseStatus(200);}@@ -76,8 +76,8 @@ class CurrencyControllerTest extends TestCasepublic function testIndex(){$this->be($this->user());- $response = $this->call('GET', '/currency');- $this->assertEquals(200, $response->status());+ $this->call('GET', '/currency');+ $this->assertResponseStatus(200);}/**@@ -93,8 +93,8 @@ class CurrencyControllerTest extends TestCase'code' => 'IUY',];- $response = $this->call('POST', '/currency/store', $args);- $this->assertEquals(302, $response->status());+ $this->call('POST', '/currency/store', $args);+ $this->assertResponseStatus(302);$this->assertSessionHas('success');$this->assertRedirectedToRoute('currency.index');}@@ -114,8 +114,8 @@ class CurrencyControllerTest extends TestCase];$this->be($this->user());- $response = $this->call('POST', '/currency/update/1', $args);- $this->assertEquals(302, $response->status());+ $this->call('POST', '/currency/update/1', $args);+ $this->assertResponseStatus(302);$this->assertSessionHas('success');$this->assertRedirectedToRoute('currency.index');diff --git a/tests/acceptance/Controllers/HelpControllerTest.php b/tests/acceptance/Controllers/HelpControllerTest.phpindex 4200ec188c..e327a9f57f 100644--- a/tests/acceptance/Controllers/HelpControllerTest.php+++ b/tests/acceptance/Controllers/HelpControllerTest.php@@ -20,9 +20,9 @@ class HelpControllerTest extends TestCasepublic function testShow(){$this->be($this->user());- $response = $this->call('GET', '/help/index');+ $this->call('GET', '/help/index');- $this->assertEquals(200, $response->status());+ $this->assertResponseStatus(200);}/**@@ -31,8 +31,8 @@ class HelpControllerTest extends TestCasepublic function testShowNoRoute(){$this->be($this->user());- $response = $this->call('GET', '/help/indxxex');+ $this->call('GET', '/help/indxxex');- $this->assertEquals(200, $response->status());+ $this->assertResponseStatus(200);}}diff --git a/tests/acceptance/Controllers/HomeControllerTest.php b/tests/acceptance/Controllers/HomeControllerTest.phpindex 3bbeb802da..fdb855aac6 100644--- a/tests/acceptance/Controllers/HomeControllerTest.php+++ b/tests/acceptance/Controllers/HomeControllerTest.php@@ -23,8 +23,8 @@ class HomeControllerTest extends TestCase];// if date range is > 50, should have flash.- $response = $this->call('POST', '/daterange', $args);- $this->assertEquals(200, $response->status());+ $this->call('POST', '/daterange', $args);+ $this->assertResponseStatus(200);$this->assertSessionHas('warning', '91 days of data may take a while to load.');}@@ -34,8 +34,8 @@ class HomeControllerTest extends TestCasepublic function testFlush(){$this->be($this->user());- $response = $this->call('GET', '/flush');- $this->assertEquals(302, $response->status());+ $this->call('GET', '/flush');+ $this->assertResponseStatus(302);}/**@@ -45,7 +45,7 @@ class HomeControllerTest extends TestCasepublic function testIndex(){$this->be($this->user());- $response = $this->call('GET', '/');- $this->assertEquals(200, $response->status());+ $this->call('GET', '/');+ $this->assertResponseStatus(200);}}\ No newline at end of filediff --git a/tests/acceptance/Controllers/JsonControllerTest.php b/tests/acceptance/Controllers/JsonControllerTest.phpindex b06d53987c..e8ba9f8c16 100644--- a/tests/acceptance/Controllers/JsonControllerTest.php+++ b/tests/acceptance/Controllers/JsonControllerTest.php@@ -21,8 +21,8 @@ class JsonControllerTest extends TestCasepublic function testAction(){$this->be($this->user());- $response = $this->call('GET', '/json/action');- $this->assertEquals(200, $response->status());+ $this->call('GET', '/json/action');+ $this->assertResponseStatus(200);}/**@@ -31,8 +31,8 @@ class JsonControllerTest extends TestCasepublic function testBoxBillsPaid(){$this->be($this->user());- $response = $this->call('GET', '/json/box/bills-paid');- $this->assertEquals(200, $response->status());+ $this->call('GET', '/json/box/bills-paid');+ $this->assertResponseStatus(200);}/**@@ -41,8 +41,8 @@ class JsonControllerTest extends TestCasepublic function testBoxBillsUnpaid(){$this->be($this->user());- $response = $this->call('GET', '/json/box/bills-unpaid');- $this->assertEquals(200, $response->status());+ $this->call('GET', '/json/box/bills-unpaid');+ $this->assertResponseStatus(200);}/**@@ -51,8 +51,8 @@ class JsonControllerTest extends TestCasepublic function testBoxIn(){$this->be($this->user());- $response = $this->call('GET', '/json/box/in');- $this->assertEquals(200, $response->status());+ $this->call('GET', '/json/box/in');+ $this->assertResponseStatus(200);}/**@@ -61,8 +61,8 @@ class JsonControllerTest extends TestCasepublic function testBoxOut(){$this->be($this->user());- $response = $this->call('GET', '/json/box/out');- $this->assertEquals(200, $response->status());+ $this->call('GET', '/json/box/out');+ $this->assertResponseStatus(200);}/**@@ -71,8 +71,8 @@ class JsonControllerTest extends TestCasepublic function testCategories(){$this->be($this->user());- $response = $this->call('GET', '/json/categories');- $this->assertEquals(200, $response->status());+ $this->call('GET', '/json/categories');+ $this->assertResponseStatus(200);}/**@@ -82,7 +82,7 @@ class JsonControllerTest extends TestCase{$this->be($this->user());$response = $this->call('POST', '/json/end-tour');- $this->assertEquals(200, $response->status());+ $this->assertResponseStatus(200);$this->assertEquals('"true"', $response->content());}@@ -92,8 +92,8 @@ class JsonControllerTest extends TestCasepublic function testExpenseAccounts(){$this->be($this->user());- $response = $this->call('GET', '/json/expense-accounts');- $this->assertEquals(200, $response->status());+ $this->call('GET', '/json/expense-accounts');+ $this->assertResponseStatus(200);}/**@@ -102,8 +102,8 @@ class JsonControllerTest extends TestCasepublic function testRevenueAccounts(){$this->be($this->user());- $response = $this->call('GET', '/json/revenue-accounts');- $this->assertEquals(200, $response->status());+ $this->call('GET', '/json/revenue-accounts');+ $this->assertResponseStatus(200);}/**@@ -112,8 +112,8 @@ class JsonControllerTest extends TestCasepublic function testTags(){$this->be($this->user());- $response = $this->call('GET', '/json/tags');- $this->assertEquals(200, $response->status());+ $this->call('GET', '/json/tags');+ $this->assertResponseStatus(200);}/**@@ -122,8 +122,8 @@ class JsonControllerTest extends TestCasepublic function testTour(){$this->be($this->user());- $response = $this->call('GET', '/json/tour');- $this->assertEquals(200, $response->status());+ $this->call('GET', '/json/tour');+ $this->assertResponseStatus(200);}/**@@ -138,8 +138,8 @@ class JsonControllerTest extends TestCase$repository->shouldReceive('getJournalsOfType')->with($type)->once()->andReturn(new Collection);$this->be($this->user());- $response = $this->call('GET', '/json/transaction-journals/deposit');- $this->assertEquals(200, $response->status());+ $this->call('GET', '/json/transaction-journals/deposit');+ $this->assertResponseStatus(200);}/**@@ -148,7 +148,7 @@ class JsonControllerTest extends TestCasepublic function testTrigger(){$this->be($this->user());- $response = $this->call('GET', '/json/trigger');- $this->assertEquals(200, $response->status());+ $this->call('GET', '/json/trigger');+ $this->assertResponseStatus(200);}}