本文整理汇总了PHP中Visitor::wantTo方法的典型用法代码示例。如果您正苦于以下问题:PHP Visitor::wantTo方法的具体用法?PHP Visitor::wantTo怎么用?PHP Visitor::wantTo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Visitor
的用法示例。
在下文中一共展示了Visitor::wantTo方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: test_free_trial
public function test_free_trial(Visitor $i)
{
return;
$i->wantTo('Check if free trial is working');
$i->click('Free 14 days trial');
$i->waitForPageLoad();
$i->canSee('Sign in to continue');
$i->click('Register now');
$i->waitForText('Back To Login');
$i->wantTo('Check if registration is working');
$i->fillAtkField('first_name', 'Tester');
$i->fillAtkField('last_name', 'User');
$i->fillAtkField('username', 'abc@gmail.com');
$i->click('Register');
$i->waitForText('Password must not be empty');
$i->fillAtkField('password', '123');
$i->click('Register');
$i->waitForText('Password did not match');
$i->fillAtkField('retype_password', 'abc@gmail.com');
$i->click('Register');
$i->waitForText('Password did not match');
$i->fillAtkField('retype_password', '123');
$i->click('Register');
$i->waitForText('Sign in to continue');
$hash = $i->grabFromDatabase('user', 'hash', array('username' => 'abc@gmail.com'));
$i->click('Activate');
$i->waitForText('Activate your Account');
$i->fillAtkField('email', 'abc@gmail.com');
$i->fillAtkField('activation_code', $hash);
$i->click('Verify');
$i->waitForText('Sign in to continue');
$i->login('abc@gmail.com', '123');
$i->wait(4);
$i->click('Got it!');
$i->fillAtkField('epan_name', '001testepan');
$i->waitForText('Free 14 day Trial');
$i->click(['css' => '.xepan-service-trial button']);
$i->wait(200);
// remove wait in case of online testing
// add test for links click (admin/website/myaccount)
}