2014-12-29 14:49:43 -06:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Class ReminderControllerCest
|
2014-12-30 10:55:46 -06:00
|
|
|
*
|
|
|
|
* @SuppressWarnings("CamelCase")
|
|
|
|
* @SuppressWarnings("short")
|
2014-12-29 14:49:43 -06:00
|
|
|
*/
|
|
|
|
class ReminderControllerCest
|
|
|
|
{
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param FunctionalTester $I
|
|
|
|
*/
|
|
|
|
public function _after(FunctionalTester $I)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param FunctionalTester $I
|
|
|
|
*/
|
|
|
|
public function _before(FunctionalTester $I)
|
|
|
|
{
|
|
|
|
$I->amLoggedAs(['email' => 'thegrumpydictator@gmail.com', 'password' => 'james']);
|
|
|
|
}
|
|
|
|
|
2014-12-30 10:55:46 -06:00
|
|
|
/**
|
|
|
|
* @param FunctionalTester $I
|
|
|
|
*/
|
2014-12-29 14:49:43 -06:00
|
|
|
public function act(FunctionalTester $I)
|
|
|
|
{
|
|
|
|
$I->wantTo('act on a reminder');
|
|
|
|
$I->amOnPage('/reminders/1/act');
|
|
|
|
$I->see('Money for Weekly reminder for clothes');
|
|
|
|
}
|
|
|
|
|
2014-12-30 10:55:46 -06:00
|
|
|
/**
|
|
|
|
* @param FunctionalTester $I
|
|
|
|
*/
|
2014-12-29 14:49:43 -06:00
|
|
|
public function dismiss(FunctionalTester $I)
|
|
|
|
{
|
|
|
|
$I->wantTo('dismiss a reminder');
|
|
|
|
$I->amOnPage('/reminders/1/dismiss');
|
|
|
|
$I->see('Reminder dismissed');
|
|
|
|
}
|
|
|
|
|
2014-12-30 10:55:46 -06:00
|
|
|
/**
|
|
|
|
* @param FunctionalTester $I
|
|
|
|
*/
|
2014-12-29 14:49:43 -06:00
|
|
|
public function notNow(FunctionalTester $I)
|
|
|
|
{
|
|
|
|
$I->wantTo('ignore a reminder');
|
|
|
|
$I->amOnPage('/reminders/1/notNow');
|
|
|
|
$I->see('Reminder dismissed');
|
|
|
|
}
|
|
|
|
|
2014-12-30 10:55:46 -06:00
|
|
|
/**
|
|
|
|
* @param FunctionalTester $I
|
|
|
|
*/
|
2014-12-29 14:49:43 -06:00
|
|
|
public function show(FunctionalTester $I)
|
|
|
|
{
|
|
|
|
$I->wantTo('see a reminder');
|
|
|
|
$I->amOnPage('/reminders/1');
|
|
|
|
$I->see('A reminder about');
|
|
|
|
$I->see('your piggy bank labelled "Weekly reminder for clothes"');
|
|
|
|
}
|
|
|
|
|
2014-12-30 10:55:46 -06:00
|
|
|
/**
|
|
|
|
* @param FunctionalTester $I
|
|
|
|
*/
|
2014-12-29 14:49:43 -06:00
|
|
|
public function actOnInvalid(FunctionalTester $I)
|
|
|
|
{
|
|
|
|
$I->wantTo('act on an invalid reminder');
|
|
|
|
$I->amOnPage('/reminders/2/act');
|
|
|
|
$I->see('This reminder has an invalid class connected to it.');
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|