mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Also covered help.
This commit is contained in:
76
tests/functional/HelpControllerCest.php
Normal file
76
tests/functional/HelpControllerCest.php
Normal file
@@ -0,0 +1,76 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Class HelpControllerCest
|
||||
*
|
||||
* @SuppressWarnings("CamelCase")
|
||||
* @SuppressWarnings("short")
|
||||
*/
|
||||
class HelpControllerCest
|
||||
{
|
||||
|
||||
/**
|
||||
* @param FunctionalTester $I
|
||||
*/
|
||||
public function _after(FunctionalTester $I)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @param FunctionalTester $I
|
||||
*/
|
||||
public function _before(FunctionalTester $I)
|
||||
{
|
||||
$I->amLoggedAs(['email' => 'thegrumpydictator@gmail.com', 'password' => 'james']);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param FunctionalTester $I
|
||||
*/
|
||||
public function show(FunctionalTester $I)
|
||||
{
|
||||
$I->wantTo('show help for the index page');
|
||||
$I->amOnPage('/help/index');
|
||||
$I->canSeeResponseCodeIs(200);
|
||||
$I->see('text');
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @param FunctionalTester $I
|
||||
*/
|
||||
public function showFromCache(FunctionalTester $I)
|
||||
{
|
||||
$I->wantTo('show help for the index page from the cache.');
|
||||
$I->amOnPage('/help/index');
|
||||
$I->amOnPage('/help/index');
|
||||
$I->canSeeResponseCodeIs(200);
|
||||
$I->see('text');
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @param FunctionalTester $I
|
||||
*/
|
||||
public function showHelpInvalidRoute(FunctionalTester $I)
|
||||
{
|
||||
$I->wantTo('show help for a non-existing route.');
|
||||
$I->amOnPage('/help/indexXXXX');
|
||||
$I->canSeeResponseCodeIs(200);
|
||||
$I->see('There is no help for this route');
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @param FunctionalTester $I
|
||||
*/
|
||||
public function showHelpNoHelpFile(FunctionalTester $I)
|
||||
{
|
||||
$I->wantTo('show help for route that has no help file.');
|
||||
$I->amOnPage('/help/help.show');
|
||||
$I->canSeeResponseCodeIs(200);
|
||||
$I->see('text');
|
||||
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user