當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。