New stuff!

This commit is contained in:
James Cole
2014-12-07 15:37:53 +01:00
parent 742479bb01
commit 6aecd77b77
31 changed files with 678 additions and 477 deletions

View File

@@ -12,4 +12,5 @@ modules:
populate: false
cleanup: false
Laravel4:
environment: 'testing'
environment: 'testing'
filters: false

View File

@@ -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

View File

@@ -1,3 +0,0 @@
<?php
$I = new FunctionalTester($scenario);
$I->wantTo('perform actions and see result');

View File

@@ -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']);

View 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');
}
}