mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-29 02:57:45 +00:00
Some tests and a rename.
This commit is contained in:
79
tests/functional/ReportControllerCest.php
Normal file
79
tests/functional/ReportControllerCest.php
Normal file
@@ -0,0 +1,79 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Class ReportControllerCest
|
||||
*
|
||||
* @SuppressWarnings("CamelCase")
|
||||
* @SuppressWarnings("short")
|
||||
*
|
||||
*/
|
||||
class ReportControllerCest
|
||||
{
|
||||
/**
|
||||
* @param FunctionalTester $I
|
||||
*/
|
||||
public function _after(FunctionalTester $I)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @param FunctionalTester $I
|
||||
*/
|
||||
public function _before(FunctionalTester $I)
|
||||
{
|
||||
$I->amLoggedAs(['email' => 'thegrumpydictator@gmail.com', 'password' => 'james']);
|
||||
}
|
||||
|
||||
public function budget(FunctionalTester $I)
|
||||
{
|
||||
$I->wantTo('see a budget report');
|
||||
$I->amOnPage('/reports/budget/2014/9');
|
||||
$I->see('Budget report for September 2014');
|
||||
}
|
||||
|
||||
public function budgetInvalidDate(FunctionalTester $I)
|
||||
{
|
||||
$I->wantTo('see a budget report for an invalid date');
|
||||
$I->amOnPage('/reports/budget/XXXX/XX');
|
||||
$I->see('Invalid date');
|
||||
}
|
||||
|
||||
public function index(FunctionalTester $I)
|
||||
{
|
||||
$I->wantTo('see all possible reports');
|
||||
$I->amOnPage('/reports');
|
||||
$I->see('Reports');
|
||||
$I->see('Monthly reports');
|
||||
$I->see('Budget reports');
|
||||
}
|
||||
|
||||
public function month(FunctionalTester $I)
|
||||
{
|
||||
$I->wantTo('see a monthly report');
|
||||
$I->amOnPage('/reports/2014/9');
|
||||
$I->see('Report for September 2014');
|
||||
}
|
||||
|
||||
public function monthInvalidDate(FunctionalTester $I)
|
||||
{
|
||||
$I->wantTo('see a monthly report for an invalid month');
|
||||
$I->amOnPage('/reports/XXXX/XX');
|
||||
$I->see('Invalid date');
|
||||
}
|
||||
|
||||
public function year(FunctionalTester $I)
|
||||
{
|
||||
$I->wantTo('see a yearly report');
|
||||
$I->amOnPage('/reports/2014');
|
||||
$I->see('Income vs. expenses');
|
||||
$I->see('Account balance');
|
||||
}
|
||||
|
||||
public function yearInvalidDate(FunctionalTester $I)
|
||||
{
|
||||
$I->wantTo('see a yearly report for an invalid year');
|
||||
$I->amOnPage('/reports/XXXX');
|
||||
$I->see('Invalid date');
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user