本文整理汇总了PHP中FunctionalTester::haveAnAccount方法的典型用法代码示例。如果您正苦于以下问题:PHP FunctionalTester::haveAnAccount方法的具体用法?PHP FunctionalTester::haveAnAccount怎么用?PHP FunctionalTester::haveAnAccount使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FunctionalTester
的用法示例。
在下文中一共展示了FunctionalTester::haveAnAccount方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: FunctionalTester
<?php
use Arc\Users\User;
$I = new FunctionalTester($scenario);
$I->wantTo('login to the Arc System');
$I->am('valid User');
$I->haveAnAccount();
$I->amOnPage('/login');
$I->fillField('email', 'j.murray@avaza.co');
$I->fillField('password', 'a52Vaza09@');
$I->click('Sign In');
$I->seeCurrentUrlEquals('/admin');
$I->see('You are logged in.');
示例2: FunctionalTester
<?php
$I = new FunctionalTester($scenario);
$I->am('a Larabook member');
$I->wantTo('list all members who are a member of Larabook');
$I->haveAnAccount(['username' => 'Foo']);
$I->haveAnAccount(['username' => 'Bar']);
$I->amOnPage('/users');
$I->see('Foo');
$I->see('Bar');
示例3: FunctionalTester
<?php
$I = new FunctionalTester($scenario);
$I->am('a Larabook user');
$I->wantTo('Follow other larabook users');
$I->haveAnAccount(['id' => 88, 'name' => 'Other User', 'email' => 'otheruser@example.com', 'password' => bcrypt('secret')]);
$I->logIn();
$I->click('Browse Users');
$I->click(2);
$I->click('Other User');
$I->seeCurrentUrlEquals('/users/88');
// When I follow a user...
$I->click('Follow Other User');
$I->seeCurrentUrlEquals('/users/88');
$I->see('You are now following Other User');
$I->See('Unfollow Other User');
/*
* Acceptance test = Client's point of view
* Functional test = From Developer's point of view
*/
// When I unfollow a user...
$I->click('Unfollow Other User');
$I->seeCurrentUrlEquals('/users/88');
$I->see('Follow Other User');
示例4: FunctionalTester
<?php
$I = new FunctionalTester($scenario);
$I->am("a Larabook User");
$I->wantTo('perform actions and see result');
$I->haveAnAccount(['username' => 'OtherUser']);
$I->signIn();
$I->click('Browse Users');
$I->click('OtherUser');
$I->seeCurrentUrlEquals('/@OtherUser');
$I->click('Follow OtherUser');
$I->seeCurrentUrlEquals('/@OtherUser');
$I->see('Unfollow OtherUser');
$I->click('Unfollow OtherUser');
$I->seeCurrentUrlEquals('/@OtherUser');
$I->see('Follow OtherUser');
示例5: FunctionalTester
<?php
$I = new FunctionalTester($scenario);
$I->am('a member');
$I->wantTo('review all users who are registered');
// setup
$I->haveAnAccount(['username' => 'foo']);
$I->haveAnAccount(['username' => 'bar']);
// action
$I->amOnPage('/users');
$I->see('foo');
$I->see('bar');