mirror of
				https://github.com/firefly-iii/firefly-iii.git
				synced 2025-10-31 02:36:28 +00:00 
			
		
		
		
	Implemented some tests.
This commit is contained in:
		| @@ -47,7 +47,6 @@ class AuthControllerTest extends TestCase | ||||
|     public function testLogin() | ||||
|     { | ||||
|         $response = $this->call('GET', '/login'); | ||||
|         $this->assertSessionHas('isLoggedIn', 'yes'); | ||||
|         $this->assertEquals(200, $response->status()); | ||||
|     } | ||||
|  | ||||
| @@ -79,7 +78,11 @@ class AuthControllerTest extends TestCase | ||||
|         ]; | ||||
|         $response = $this->call('POST', '/login', $args); | ||||
|         $this->assertEquals(302, $response->status()); | ||||
|         $this->assertSessionHas('isLoggedIn', 'yes'); | ||||
|  | ||||
|         $response = $this->call('GET', '/'); | ||||
|         $this->assertEquals(200, $response->status()); | ||||
|  | ||||
|  | ||||
|  | ||||
|     } | ||||
|  | ||||
| @@ -98,51 +101,12 @@ class AuthControllerTest extends TestCase | ||||
|         $this->assertSessionHas('start'); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * @covers FireflyIII\Http\Controllers\Auth\AuthController::redirectPath | ||||
|      * @todo   Implement testRedirectPath(). | ||||
|      */ | ||||
|     public function testRedirectPath() | ||||
|     { | ||||
|         // Remove the following lines when you implement this test. | ||||
|         $this->markTestIncomplete( | ||||
|             'This test has not been implemented yet.' | ||||
|         ); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * @covers FireflyIII\Http\Controllers\Auth\AuthController::register | ||||
|      * @todo   Implement testRegister(). | ||||
|      */ | ||||
|     public function testRegister() | ||||
|     { | ||||
|         // Remove the following lines when you implement this test. | ||||
|         $this->markTestIncomplete( | ||||
|             'This test has not been implemented yet.' | ||||
|         ); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * @covers FireflyIII\Http\Controllers\Auth\AuthController::showLoginForm | ||||
|      * @todo   Implement testShowLoginForm(). | ||||
|      */ | ||||
|     public function testShowLoginForm() | ||||
|     { | ||||
|         // Remove the following lines when you implement this test. | ||||
|         $this->markTestIncomplete( | ||||
|             'This test has not been implemented yet.' | ||||
|         ); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * @covers FireflyIII\Http\Controllers\Auth\AuthController::showRegistrationForm | ||||
|      * @todo   Implement testShowRegistrationForm(). | ||||
|      */ | ||||
|     public function testShowRegistrationForm() | ||||
|     { | ||||
|         // Remove the following lines when you implement this test. | ||||
|         $this->markTestIncomplete( | ||||
|             'This test has not been implemented yet.' | ||||
|         ); | ||||
|         $response = $this->call('GET', '/register'); | ||||
|         $this->assertEquals(200, $response->status()); | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -12,124 +12,17 @@ | ||||
|  */ | ||||
| class PasswordControllerTest extends TestCase | ||||
| { | ||||
|  | ||||
|     /** | ||||
|      * @covers FireflyIII\Http\Controllers\Auth\PasswordController::getBroker | ||||
|      * @todo   Implement testGetBroker(). | ||||
|      */ | ||||
|     public function testGetBroker() | ||||
|     { | ||||
|         // Remove the following lines when you implement this test. | ||||
|         $this->markTestIncomplete( | ||||
|             'This test has not been implemented yet.' | ||||
|         ); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * @covers FireflyIII\Http\Controllers\Auth\PasswordController::getEmail | ||||
|      * @todo   Implement testGetEmail(). | ||||
|      */ | ||||
|     public function testGetEmail() | ||||
|     { | ||||
|         // Remove the following lines when you implement this test. | ||||
|         $this->markTestIncomplete( | ||||
|             'This test has not been implemented yet.' | ||||
|         ); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * @covers FireflyIII\Http\Controllers\Auth\PasswordController::getReset | ||||
|      * @todo   Implement testGetReset(). | ||||
|      */ | ||||
|     public function testGetReset() | ||||
|     { | ||||
|         // Remove the following lines when you implement this test. | ||||
|         $this->markTestIncomplete( | ||||
|             'This test has not been implemented yet.' | ||||
|         ); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * @covers FireflyIII\Http\Controllers\Auth\PasswordController::postEmail | ||||
|      * @todo   Implement testPostEmail(). | ||||
|      */ | ||||
|     public function testPostEmail() | ||||
|     { | ||||
|         // Remove the following lines when you implement this test. | ||||
|         $this->markTestIncomplete( | ||||
|             'This test has not been implemented yet.' | ||||
|         ); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * @covers FireflyIII\Http\Controllers\Auth\PasswordController::postReset | ||||
|      * @todo   Implement testPostReset(). | ||||
|      */ | ||||
|     public function testPostReset() | ||||
|     { | ||||
|         // Remove the following lines when you implement this test. | ||||
|         $this->markTestIncomplete( | ||||
|             'This test has not been implemented yet.' | ||||
|         ); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * @covers FireflyIII\Http\Controllers\Auth\PasswordController::redirectPath | ||||
|      * @todo   Implement testRedirectPath(). | ||||
|      */ | ||||
|     public function testRedirectPath() | ||||
|     { | ||||
|         // Remove the following lines when you implement this test. | ||||
|         $this->markTestIncomplete( | ||||
|             'This test has not been implemented yet.' | ||||
|         ); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * @covers FireflyIII\Http\Controllers\Auth\PasswordController::reset | ||||
|      * @todo   Implement testReset(). | ||||
|      */ | ||||
|     public function testReset() | ||||
|     { | ||||
|         // Remove the following lines when you implement this test. | ||||
|         $this->markTestIncomplete( | ||||
|             'This test has not been implemented yet.' | ||||
|         ); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * @covers FireflyIII\Http\Controllers\Auth\PasswordController::sendResetLinkEmail | ||||
|      * @todo   Implement testSendResetLinkEmail(). | ||||
|      */ | ||||
|     public function testSendResetLinkEmail() | ||||
|     { | ||||
|         // Remove the following lines when you implement this test. | ||||
|         $this->markTestIncomplete( | ||||
|             'This test has not been implemented yet.' | ||||
|         ); | ||||
|         $args = [ | ||||
|             'email'  => 'thegrumpydictator@gmail.com', | ||||
|             '_token' => Session::token(), | ||||
|         ]; | ||||
|         $response = $this->call('POST', '/password/email', $args); | ||||
|         $this->assertEquals(302, $response->status()); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * @covers FireflyIII\Http\Controllers\Auth\PasswordController::showLinkRequestForm | ||||
|      * @todo   Implement testShowLinkRequestForm(). | ||||
|      */ | ||||
|     public function testShowLinkRequestForm() | ||||
|     { | ||||
|         // Remove the following lines when you implement this test. | ||||
|         $this->markTestIncomplete( | ||||
|             'This test has not been implemented yet.' | ||||
|         ); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * @covers FireflyIII\Http\Controllers\Auth\PasswordController::showResetForm | ||||
|      * @todo   Implement testShowResetForm(). | ||||
|      */ | ||||
|     public function testShowResetForm() | ||||
|     { | ||||
|         // Remove the following lines when you implement this test. | ||||
|         $this->markTestIncomplete( | ||||
|             'This test has not been implemented yet.' | ||||
|         ); | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -14,49 +14,45 @@ class ChartAccountControllerTest extends TestCase | ||||
| { | ||||
|     /** | ||||
|      * @covers FireflyIII\Http\Controllers\Chart\AccountController::expenseAccounts | ||||
|      * @todo   Implement testExpenseAccounts(). | ||||
|      */ | ||||
|     public function testExpenseAccounts() | ||||
|     { | ||||
|         // Remove the following lines when you implement this test. | ||||
|         $this->markTestIncomplete( | ||||
|             'This test has not been implemented yet.' | ||||
|         ); | ||||
|         $this->be($this->user()); | ||||
|         $response = $this->call('GET', '/chart/account/expense'); | ||||
|  | ||||
|         $this->assertEquals(200, $response->status()); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * @covers FireflyIII\Http\Controllers\Chart\AccountController::frontpage | ||||
|      * @todo   Implement testFrontpage(). | ||||
|      */ | ||||
|     public function testFrontpage() | ||||
|     { | ||||
|         // Remove the following lines when you implement this test. | ||||
|         $this->markTestIncomplete( | ||||
|             'This test has not been implemented yet.' | ||||
|         ); | ||||
|         $this->be($this->user()); | ||||
|         $response = $this->call('GET', '/chart/account/frontpage'); | ||||
|  | ||||
|         $this->assertEquals(200, $response->status()); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * @covers FireflyIII\Http\Controllers\Chart\AccountController::report | ||||
|      * @todo   Implement testReport(). | ||||
|      */ | ||||
|     public function testReport() | ||||
|     { | ||||
|         // Remove the following lines when you implement this test. | ||||
|         $this->markTestIncomplete( | ||||
|             'This test has not been implemented yet.' | ||||
|         ); | ||||
|         $this->be($this->user()); | ||||
|         $response = $this->call('GET', '/chart/account/report/default/20160101/20160131/1'); | ||||
|  | ||||
|         $this->assertEquals(200, $response->status()); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * @covers FireflyIII\Http\Controllers\Chart\AccountController::single | ||||
|      * @todo   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()); | ||||
|         $response = $this->call('GET', '/chart/account/1'); | ||||
|  | ||||
|         $this->assertEquals(200, $response->status()); | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -15,25 +15,23 @@ class ChartBillControllerTest extends TestCase | ||||
|  | ||||
|     /** | ||||
|      * @covers FireflyIII\Http\Controllers\Chart\BillController::frontpage | ||||
|      * @todo   Implement testFrontpage(). | ||||
|      */ | ||||
|     public function testFrontpage() | ||||
|     { | ||||
|         // Remove the following lines when you implement this test. | ||||
|         $this->markTestIncomplete( | ||||
|             'This test has not been implemented yet.' | ||||
|         ); | ||||
|         $this->be($this->user()); | ||||
|         $response = $this->call('GET', '/chart/bill/frontpage'); | ||||
|  | ||||
|         $this->assertEquals(200, $response->status()); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * @covers FireflyIII\Http\Controllers\Chart\BillController::single | ||||
|      * @todo   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()); | ||||
|         $response = $this->call('GET', '/chart/bill/1'); | ||||
|  | ||||
|         $this->assertEquals(200, $response->status()); | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -15,61 +15,58 @@ class ChartBudgetControllerTest extends TestCase | ||||
|  | ||||
|     /** | ||||
|      * @covers FireflyIII\Http\Controllers\Chart\BudgetController::budget | ||||
|      * @todo   Implement testBudget(). | ||||
|      */ | ||||
|     public function testBudget() | ||||
|     { | ||||
|         // Remove the following lines when you implement this test. | ||||
|         $this->markTestIncomplete( | ||||
|             'This test has not been implemented yet.' | ||||
|         ); | ||||
| //        $this->be($this->user()); | ||||
| //        $response = $this->call('GET', '/chart/budget/1'); | ||||
| //        $this->assertEquals(200, $response->status()); | ||||
|         $this->markTestSkipped('Skipped because sqlite does not support DATE_FORMAT.'); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * @covers FireflyIII\Http\Controllers\Chart\BudgetController::budgetLimit | ||||
|      * @todo   Implement testBudgetLimit(). | ||||
|      */ | ||||
|     public function testBudgetLimit() | ||||
|     { | ||||
|         // Remove the following lines when you implement this test. | ||||
|         $this->markTestIncomplete( | ||||
|             'This test has not been implemented yet.' | ||||
|         ); | ||||
|         $this->be($this->user()); | ||||
|         $response = $this->call('GET', '/chart/budget/1/1'); | ||||
|  | ||||
|         $this->assertEquals(200, $response->status()); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * @covers FireflyIII\Http\Controllers\Chart\BudgetController::frontpage | ||||
|      * @todo   Implement testFrontpage(). | ||||
|      */ | ||||
|     public function testFrontpage() | ||||
|     { | ||||
|         // Remove the following lines when you implement this test. | ||||
|         $this->markTestIncomplete( | ||||
|             'This test has not been implemented yet.' | ||||
|         ); | ||||
|         $this->be($this->user()); | ||||
|         $response = $this->call('GET', '/chart/budget/frontpage'); | ||||
|  | ||||
|         $this->assertEquals(200, $response->status()); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * @covers FireflyIII\Http\Controllers\Chart\BudgetController::multiYear | ||||
|      * @todo   Implement testMultiYear(). | ||||
|      */ | ||||
|     public function testMultiYear() | ||||
|     { | ||||
|         // Remove the following lines when you implement this test. | ||||
|         $this->markTestIncomplete( | ||||
|             'This test has not been implemented yet.' | ||||
|         ); | ||||
| //        $this->be($this->user()); | ||||
| //        $response = $this->call('GET', '/chart/budget/multi-year/default/20150101/20160101/1/1'); | ||||
| //        $this->assertEquals(200, $response->status()); | ||||
|         $this->markTestSkipped('Skipped because sqlite does not support DATE_FORMAT.'); | ||||
|  | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * @covers FireflyIII\Http\Controllers\Chart\BudgetController::year | ||||
|      * @todo   Implement testYear(). | ||||
|      */ | ||||
|     public function testYear() | ||||
|     { | ||||
|         // Remove the following lines when you implement this test. | ||||
|         $this->markTestIncomplete( | ||||
|             'This test has not been implemented yet.' | ||||
|         ); | ||||
| //        $this->be($this->user()); | ||||
| //        $response = $this->call('GET', '/chart/budget/year/default/20150101/201512031/1'); | ||||
| //        $this->assertEquals(200, $response->status()); | ||||
|         $this->markTestSkipped('Skipped because sqlite does not support DATE_FORMAT.'); | ||||
|  | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -15,85 +15,78 @@ class ChartCategoryControllerTest extends TestCase | ||||
|  | ||||
|     /** | ||||
|      * @covers FireflyIII\Http\Controllers\Chart\CategoryController::all | ||||
|      * @todo   Implement testAll(). | ||||
|      */ | ||||
|     public function testAll() | ||||
|     { | ||||
|         // Remove the following lines when you implement this test. | ||||
|         $this->markTestIncomplete( | ||||
|             'This test has not been implemented yet.' | ||||
|         ); | ||||
|         $this->be($this->user()); | ||||
|         $response = $this->call('GET', '/chart/category/1/all'); | ||||
|  | ||||
|         $this->assertEquals(200, $response->status()); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * @covers FireflyIII\Http\Controllers\Chart\CategoryController::currentPeriod | ||||
|      * @todo   Implement testCurrentPeriod(). | ||||
|      */ | ||||
|     public function testCurrentPeriod() | ||||
|     { | ||||
|         // Remove the following lines when you implement this test. | ||||
|         $this->markTestIncomplete( | ||||
|             'This test has not been implemented yet.' | ||||
|         ); | ||||
|         $this->be($this->user()); | ||||
|         $response = $this->call('GET', '/chart/category/1/period'); | ||||
|  | ||||
|         $this->assertEquals(200, $response->status()); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * @covers FireflyIII\Http\Controllers\Chart\CategoryController::earnedInPeriod | ||||
|      * @todo   Implement testEarnedInPeriod(). | ||||
|      */ | ||||
|     public function testEarnedInPeriod() | ||||
|     { | ||||
|         // Remove the following lines when you implement this test. | ||||
|         $this->markTestIncomplete( | ||||
|             'This test has not been implemented yet.' | ||||
|         ); | ||||
| //        $this->be($this->user()); | ||||
| //        $response = $this->call('GET', '/chart/category/earned-in-period/default/20150101/20151231/1'); | ||||
| //        $this->assertEquals(200, $response->status()); | ||||
|         $this->markTestSkipped('Skipped because sqlite does not support DATE_FORMAT.'); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * @covers FireflyIII\Http\Controllers\Chart\CategoryController::frontpage | ||||
|      * @todo   Implement testFrontpage(). | ||||
|      */ | ||||
|     public function testFrontpage() | ||||
|     { | ||||
|         // Remove the following lines when you implement this test. | ||||
|         $this->markTestIncomplete( | ||||
|             'This test has not been implemented yet.' | ||||
|         ); | ||||
| //        $this->be($this->user()); | ||||
| //        $response = $this->call('GET', '/chart/category/frontpage'); | ||||
| //        $this->assertEquals(200, $response->status()); | ||||
|         $this->markTestSkipped('Skipped because sqlite does not support DATE_FORMAT.'); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * @covers FireflyIII\Http\Controllers\Chart\CategoryController::multiYear | ||||
|      * @todo   Implement testMultiYear(). | ||||
|      */ | ||||
|     public function testMultiYear() | ||||
|     { | ||||
|         // Remove the following lines when you implement this test. | ||||
|         $this->markTestIncomplete( | ||||
|             'This test has not been implemented yet.' | ||||
|         ); | ||||
| //        $this->be($this->user()); | ||||
| //        $response = $this->call('GET', '/chart/category/multi-year/default/20150101/20151231/1/1'); | ||||
| //        $this->assertEquals(200, $response->status()); | ||||
|         $this->markTestSkipped('Skipped because sqlite does not support DATE_FORMAT.'); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * @covers FireflyIII\Http\Controllers\Chart\CategoryController::specificPeriod | ||||
|      * @todo   Implement testSpecificPeriod(). | ||||
|      */ | ||||
|     public function testSpecificPeriod() | ||||
|     { | ||||
|         // Remove the following lines when you implement this test. | ||||
|         $this->markTestIncomplete( | ||||
|             'This test has not been implemented yet.' | ||||
|         ); | ||||
|         $this->be($this->user()); | ||||
|         $response = $this->call('GET', '/chart/category/1/period/20150101'); | ||||
|  | ||||
|         $this->assertEquals(200, $response->status()); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * @covers FireflyIII\Http\Controllers\Chart\CategoryController::spentInPeriod | ||||
|      * @todo   Implement testSpentInPeriod(). | ||||
|      */ | ||||
|     public function testSpentInPeriod() | ||||
|     { | ||||
|         // Remove the following lines when you implement this test. | ||||
|         $this->markTestIncomplete( | ||||
|             'This test has not been implemented yet.' | ||||
|         ); | ||||
| //        $this->be($this->user()); | ||||
| //        $response = $this->call('GET', '/chart/category/spent-in-period/default/20150101/20151231/1'); | ||||
| //        $this->assertEquals(200, $response->status()); | ||||
|         $this->markTestSkipped('Skipped because sqlite does not support DATE_FORMAT.'); | ||||
|     } | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user