mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-07 14:41:20 +00:00
New stuff!
This commit is contained in:
@@ -12,4 +12,5 @@ modules:
|
||||
populate: false
|
||||
cleanup: false
|
||||
Laravel4:
|
||||
environment: 'testing'
|
||||
environment: 'testing'
|
||||
filters: false
|
||||
@@ -1,4 +1,4 @@
|
||||
<?php //[STAMP] 783e39b9effa232e3a9a3fc0349ec983
|
||||
<?php //[STAMP] defdb4be0e39e8a2ea8d92c0ff514877
|
||||
|
||||
// This class was automatically generated by build task
|
||||
// You should not change it manually as it will be overwritten on next build
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
<?php
|
||||
$I = new FunctionalTester($scenario);
|
||||
$I->wantTo('perform actions and see result');
|
||||
@@ -1,7 +0,0 @@
|
||||
<?php
|
||||
$I = new FunctionalTester($scenario);
|
||||
$I->wantTo('register a new account');
|
||||
$I->amOnPage('/register');
|
||||
$I->submitForm('#register', ['email' => 'noreply@gmail.com']);
|
||||
$I->see('Password sent!');
|
||||
$I->seeRecord('users', ['email' => 'noreply@gmail.com']);
|
||||
104
tests/functional/UserControllerCest.php
Normal file
104
tests/functional/UserControllerCest.php
Normal file
@@ -0,0 +1,104 @@
|
||||
<?php
|
||||
|
||||
class UserControllerCest
|
||||
{
|
||||
/**
|
||||
* @param FunctionalTester $I
|
||||
*/
|
||||
public function _after(FunctionalTester $I)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @param FunctionalTester $I
|
||||
*/
|
||||
public function _before(FunctionalTester $I)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @param FunctionalTester $I
|
||||
*/
|
||||
public function login(FunctionalTester $I)
|
||||
{
|
||||
$I->wantTo('login');
|
||||
$I->amOnPage('/login');
|
||||
$I->see('Sign In');
|
||||
$I->submitForm('#login', ['email' => 'functional@example.com','password' => 'functional']);
|
||||
$I->see('functional@example.com');
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @param FunctionalTester $I
|
||||
*/
|
||||
public function logout(FunctionalTester $I)
|
||||
{
|
||||
$I->wantTo('logout');
|
||||
#$I->amOnPage('/logout');
|
||||
#$I->am
|
||||
}
|
||||
|
||||
/**
|
||||
* @param FunctionalTester $I
|
||||
*/
|
||||
public function postLogin(FunctionalTester $I)
|
||||
{
|
||||
$I->wantTo('post login');
|
||||
$I->amOnRoute('login');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param FunctionalTester $I
|
||||
*/
|
||||
public function postRegister(FunctionalTester $I)
|
||||
{
|
||||
// @codingStandardsIgnoreStart
|
||||
$I->wantTo('post-register a new account');
|
||||
$I->amOnPage('/register');
|
||||
$token = $I->grabValueFrom('input[name=_token]');
|
||||
$I->submitForm('#register', ['email' => 'noreply@gmail.com','_token' => $token]);
|
||||
$I->see('Password sent!');
|
||||
$I->seeRecord('users', ['email' => 'noreply@gmail.com']);
|
||||
// @codingStandardsIgnoreEnd
|
||||
}
|
||||
|
||||
/**
|
||||
* @param FunctionalTester $I
|
||||
*/
|
||||
public function postRemindme(FunctionalTester $I)
|
||||
{
|
||||
$I->wantTo('get a password reminder');
|
||||
$I->amOnRoute('remindme');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param FunctionalTester $I
|
||||
*/
|
||||
public function register(FunctionalTester $I)
|
||||
{
|
||||
$I->wantTo('register a new account');
|
||||
$I->amOnRoute('register');
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @param FunctionalTester $I
|
||||
*/
|
||||
public function remindme(FunctionalTester $I)
|
||||
{
|
||||
$I->wantTo('reminded of my password');
|
||||
$I->amOnRoute('remindme');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param FunctionalTester $I
|
||||
*/
|
||||
public function reset(FunctionalTester $I)
|
||||
{
|
||||
$I->wantTo('reset my password');
|
||||
$I->amOnRoute('reset');
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user