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


PHP FunctionalTester::canSeeCurrentUrlEquals方法代码示例

本文整理汇总了PHP中FunctionalTester::canSeeCurrentUrlEquals方法的典型用法代码示例。如果您正苦于以下问题:PHP FunctionalTester::canSeeCurrentUrlEquals方法的具体用法?PHP FunctionalTester::canSeeCurrentUrlEquals怎么用?PHP FunctionalTester::canSeeCurrentUrlEquals使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在FunctionalTester的用法示例。


在下文中一共展示了FunctionalTester::canSeeCurrentUrlEquals方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: memberCanClaimBox

 public function memberCanClaimBox(FunctionalTester $I)
 {
     $I->am('a member');
     $I->wantTo('make sure I can claim a box');
     //Load and login a known member
     $user = User::find(1);
     $I->amLoggedAs($user);
     //Create a box payment
     $I->haveInDatabase('payments', ['user_id' => $user->id, 'reason' => 'storage-box', 'source' => 'other', 'amount' => 5.0, 'status' => 'paid']);
     //$user->storage_box_payment_id = $paymentId;
     //$user->save();
     $I->amOnPage('/storage_boxes');
     //Make sure it has seen our payment
     $I->see("Total Paid &pound5");
     //Claim a box
     $I->see('Claim');
     $I->click('Claim');
     //We should end up back on the page
     $I->canSeeCurrentUrlEquals('/storage_boxes');
     //The page should now have our name next to the claimed box
     $I->see($user->name);
     //The box should be ours
     $I->seeInDatabase('storage_boxes', ['user_id' => $user->id]);
     //Add another payment
     $I->haveInDatabase('payments', ['user_id' => $user->id, 'reason' => 'storage-box', 'source' => 'other', 'amount' => 10.0, 'status' => 'paid']);
     $I->amOnPage('/storage_boxes');
     //Make sure it has seen our new payment
     $I->see("Total Paid &pound15");
     //We should now be able to claim another box
     $I->see('Claim');
     $I->click('Claim');
 }
开发者ID:adamstrawson,项目名称:BBMembershipSystem,代码行数:32,代码来源:MemberStorageCest.php

示例2: guestCantVisitSomeonesBalancePage

 public function guestCantVisitSomeonesBalancePage(FunctionalTester $I)
 {
     $I->am('a guest');
     $I->wantTo('make sure I can\'t view a balance page');
     //I can see the menu item
     $I->amOnPage('/account/1/balance');
     $I->canSeeCurrentUrlEquals('/login');
 }
开发者ID:adamstrawson,项目名称:BBMembershipSystem,代码行数:8,代码来源:MemberCest.php

示例3: guestCantVisitRolesPage

 public function guestCantVisitRolesPage(FunctionalTester $I)
 {
     $I->am('a guest');
     $I->wantTo('make sure I can\'t view the roles page');
     //I can see the menu item
     $I->amOnPage('/roles');
     $I->canSeeCurrentUrlEquals('/login');
 }
开发者ID:adamstrawson,项目名称:BBMembershipSystem,代码行数:8,代码来源:RolesCest.php

示例4: nonMemberCantViewExpenses

 public function nonMemberCantViewExpenses(FunctionalTester $I)
 {
     $I->am('a guest');
     $I->wantTo('make sure I cant view the list of expenses');
     //Create a proposal that's currently open
     $I->haveInDatabase('expenses', ['id' => 1, 'category' => 'consumables', 'description' => 'Sample Description', 'user_id' => '3', 'amount' => 1234, 'expense_date' => Carbon::now()]);
     $I->amOnPage('/expenses');
     $I->canSeeCurrentUrlEquals('/login');
 }
开发者ID:adamstrawson,项目名称:BBMembershipSystem,代码行数:9,代码来源:ExpensesCest.php

示例5: adminCanEditUnstartedProposal

 public function adminCanEditUnstartedProposal(FunctionalTester $I)
 {
     $I->am('an admin');
     $I->wantTo('make sure I can edit a proposal that hasnt been started');
     //Create a proposal that's currently open
     $startDate = Carbon::now()->addDays(1)->format('Y-m-d');
     $endDate = Carbon::now()->addDays(5)->format('Y-m-d');
     $I->haveInDatabase('proposals', ['id' => 2, 'title' => 'Proposal 2', 'description' => 'Demo Description', 'user_id' => '3', 'start_date' => $startDate, 'end_date' => $endDate]);
     //Load and login a known member
     $user = User::find(3);
     Auth::login($user);
     $I->amOnPage('/proposals/2');
     //I can visit the edit page
     $I->click('Edit Proposal');
     $I->canSeeCurrentUrlEquals('/proposals/2/edit');
     $I->click('Update');
     $I->canSeeCurrentUrlEquals('/proposals');
 }
开发者ID:adamstrawson,项目名称:BBMembershipSystem,代码行数:18,代码来源:ProposalsCest.php

示例6: FunctionalTester

<?php

use BB\Entities\User;
$I = new FunctionalTester($scenario);
$I->am('a member');
$I->wantTo('view the equipment training page');
//Load and login a known member
$user = User::find(1);
Auth::login($user);
//I can see the menu item
$I->amOnPage('/');
$I->canSee('Tools and Equipment');
$I->click('Tools and Equipment');
$I->canSeeCurrentUrlEquals('/equipment');
$I->seeResponseCodeIs(200);
开发者ID:adamstrawson,项目名称:BBMembershipSystem,代码行数:15,代码来源:MemberCanAccessInductionPageCept.php

示例7: FunctionalTester

<?php

use BB\Entities\User;
$I = new FunctionalTester($scenario);
$I->am('a member');
$I->wantTo('view a members profile');
//Load and login a known member
$user = User::find(1);
Auth::login($user);
//I can see the menu item
$I->amOnPage('/');
$I->canSee('Members');
$I->click('Members');
$I->canSeeCurrentUrlEquals('/members');
$I->canSee('Members');
$I->click($user->name);
$I->canSeeCurrentUrlEquals('/members/' . $user->id);
$I->canSee($user->name);
开发者ID:adamstrawson,项目名称:BBMembershipSystem,代码行数:18,代码来源:MemberCanAccessProfilePagesCept.php

示例8: FunctionalTester

<?php

use Laracasts\TestDummy\Factory;
$I = new FunctionalTester($scenario);
$I->am('talent4startups member');
$I->wantTo('login to my talent4startups account');
$user = Factory::create('App\\Models\\User', ['password' => 'password']);
$I->amOnPage('/');
$I->click('#login-link');
$I->canSeeCurrentUrlEquals('/auth/login');
$I->submitForm('form', ['email' => $user->email, 'password' => '']);
$I->dontSeeAuthentication();
$I->submitForm('form', ['email' => $user->email, 'password' => 'wrong_password']);
$I->dontSeeAuthentication();
$I->submitForm('form', ['email' => $user->email, 'password' => 'password']);
$I->amLoggedAs($user);
开发者ID:katzumi,项目名称:talent4startups,代码行数:16,代码来源:SigninCept.php

示例9: FunctionalTester

<?php

use BB\Entities\User;
$I = new FunctionalTester($scenario);
$I->am('a member');
$I->wantTo('view the profile edit page');
//Load and login a known member
$user = User::find(1);
Auth::login($user);
$I->amOnPage('/account/' . $user->id);
$I->seeResponseCodeIs(200);
$I->canSeeCurrentUrlEquals('/account/' . $user->id);
//$I->click('Edit Your Profile');
$I->canSee('Edit Your Profile');
$I->amOnPage('/account/' . $user->id . '/profile/edit');
$I->seeResponseCodeIs(200);
$I->canSeeCurrentUrlEquals('/account/' . $user->id . '/profile/edit');
开发者ID:adamstrawson,项目名称:BBMembershipSystem,代码行数:17,代码来源:MemberCanAcceseProfileEditPageCept.php

示例10: FunctionalTester

<?php

$I = new FunctionalTester($scenario);
//setup
$I->am('a user');
$I->wantTo('logout from my account');
$I->amAuthenticatedWithCredentials();
$I->canSeeAuthentication();
//action
$I->amOnPage('/logout');
//verify
$I->canSeeCurrentUrlEquals('');
$I->cantSeeAuthentication();
开发者ID:iris-it,项目名称:irispass-webapp-laravel,代码行数:13,代码来源:LogoutCept.php

示例11: FunctionalTester

<?php

use BB\Entities\User;
$I = new FunctionalTester($scenario);
$I->am('a member');
$I->wantTo('view the stats page');
//Load and login a known member
$user = User::find(1);
Auth::login($user);
//I can see the menu item
$I->amOnPage('/');
$I->canSee('Stats');
//Try and go to the stats page
$I->amOnPage('/stats');
$I->canSeeCurrentUrlEquals('/stats');
$I->canSee('Payment Methods');
开发者ID:adamstrawson,项目名称:BBMembershipSystem,代码行数:16,代码来源:MemberCanAccessStatsPageCept.php


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