Skip to content

Instantly share code, notes, and snippets.

@andrewhl
Created June 13, 2014 16:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andrewhl/a1672b05aa8fcdc0b151 to your computer and use it in GitHub Desktop.
Save andrewhl/a1672b05aa8fcdc0b151 to your computer and use it in GitHub Desktop.
<?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