Created
June 13, 2014 16:24
-
-
Save andrewhl/a1672b05aa8fcdc0b151 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class SignUpHelper { | |
/** | |
* @var AcceptanceTester | |
*/ | |
private $tester; | |
function __construct(AcceptanceTester $tester) | |
{ | |
$this->tester = $tester; | |
} | |
public function signUp() | |
{ | |
$I->wantTo('sign up'); | |
$I->amOnPage('/'); | |
$I->click('Sign up'); | |
$I->submitForm('#sign_up', [ | |
'first_name' => 'Joe', | |
'last_name' => 'Jones', | |
'email' => 'joe@jones.com', | |
'password' => '1234', | |
'password_confirmation' => '1234' | |
]); | |
$I->amOnPage('/'); | |
} | |
} | |
$I = new AcceptanceTester($scenario); | |
$tester = new SignUpHelper($I); | |
$tester->signUp(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment