当前位置: 首页>>代码示例>>PHP>>正文


PHP FunctionalTester::haveAnAccount方法代码示例

本文整理汇总了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.');
开发者ID:avaza,项目名称:arc,代码行数:13,代码来源:AuthenticateUserCept.php

示例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');
开发者ID:billwaddyjr,项目名称:Larabook2.0,代码行数:10,代码来源:ShowUsersCept.php

示例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');
开发者ID:rolandtacadena,项目名称:larabook-updated,代码行数:24,代码来源:FollowingCept.php

示例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');
开发者ID:emukiri,项目名称:larabook,代码行数:15,代码来源:FollowingCept.php

示例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');
开发者ID:jimmitjoo,项目名称:social-foundation,代码行数:12,代码来源:ShowUsersCept.php


注:本文中的FunctionalTester::haveAnAccount方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。