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


PHP FunctionalTester::canSee方法代码示例

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


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

示例1: memberCanLeave

 public function memberCanLeave(FunctionalTester $I)
 {
     $I->am('a member');
     $I->wantTo('leave build brighton');
     //Load and login a known member
     $user = User::find(1);
     Auth::login($user);
     $I->amOnPage('/account/' . $user->id . '');
     $I->canSee('Active');
     $I->click("Leave Build Brighton");
     $I->canSee('Leaving');
 }
开发者ID:adamstrawson,项目名称:BBMembershipSystem,代码行数:12,代码来源:MemberCest.php

示例2: memberCanVisitStoragePage

 public function memberCanVisitStoragePage(FunctionalTester $I)
 {
     $I->am('a member');
     $I->wantTo('make sure I can view the member box page');
     //Load and login a known member
     $user = User::find(1);
     Auth::login($user);
     //I can see the menu item
     $I->amOnPage('/storage_boxes');
     $I->canSee('Member Storage Boxes');
     $I->cantSee($user->name);
     //Make sure the message about paying for a box is displayed
     $I->canSee('5 deposit');
 }
开发者ID:adamstrawson,项目名称:BBMembershipSystem,代码行数:14,代码来源:MemberStorageCest.php

示例3: adminCanDeclineExpenses

 public function adminCanDeclineExpenses(FunctionalTester $I)
 {
     $I->am('an admin');
     $I->wantTo('make sure I can decline an expense');
     //Create a proposal that's currently open
     $I->haveInDatabase('expenses', ['id' => 4, 'category' => 'consumables', 'description' => 'Another Description', 'user_id' => '3', 'amount' => 1234, 'expense_date' => Carbon::now()]);
     //Load and login a known member
     $user = User::find(3);
     Auth::login($user);
     $I->amOnPage('/expenses');
     $I->canSee('Expenses');
     $I->canSee('Another Description');
     $I->cantSee('Declined by');
     $I->click('Decline');
     $I->canSee('Declined by');
 }
开发者ID:adamstrawson,项目名称:BBMembershipSystem,代码行数:16,代码来源:ExpensesCest.php

示例4: cantCreateDuplicateKeyEntry

 public function cantCreateDuplicateKeyEntry(FunctionalTester $I)
 {
     $I->am('an equipment team member');
     $I->wantTo('make sure I cant create duplicate entries');
     //Load and login a known member
     $I->loginEquipmentTeamMember();
     $I->amOnPage('/equipment');
     $I->canSee('Record a new item');
     $name = $this->faker->word;
     $slug = substr($this->faker->slug, 0, 10);
     //First item
     $I->click('Record a new item');
     $I->fillField('Name', $name);
     $I->fillField('Slug', $slug);
     $I->click('Save');
     $I->seeCurrentUrlEquals('/equipment/' . $slug . '/edit');
     /*
     //Second item
     $I->click('Record a new item');
     $I->fillField('Name', $name);
     $I->fillField('Key', $slug);
     
     $I->assertTrue(
         $I->seeExceptionThrown('BB\Exceptions\FormValidationException', function() use ($I){
             $I->click('Save');
         })
     );
     */
 }
开发者ID:adamstrawson,项目名称:BBMembershipSystem,代码行数:29,代码来源:EquipmentCest.php

示例5: adminCanVisitRolesPage

 public function adminCanVisitRolesPage(FunctionalTester $I)
 {
     $I->am('an admin');
     $I->wantTo('make sure I can view the roles page');
     //Load and login a known member
     $user = User::find(3);
     \Auth::login($user);
     //I can see the menu item
     $I->amOnPage('/roles');
     $I->canSee('Member Roles');
 }
开发者ID:adamstrawson,项目名称:BBMembershipSystem,代码行数:11,代码来源:RolesCest.php

示例6: memberCantSneakyVoteOnNotStartedProposal

 public function memberCantSneakyVoteOnNotStartedProposal(FunctionalTester $I)
 {
     $I->am('a member');
     $I->wantTo('make sure I cant sneakily vote on a proposal that hasnt started yet');
     //Create a proposal starting in the future
     $startDate = Carbon::now()->addDay()->format('Y-m-d');
     $endDate = Carbon::now()->addDays(3)->format('Y-m-d');
     $I->haveInDatabase('proposals', ['id' => 4, 'title' => 'Proposal 4', 'description' => 'Demo Description', 'user_id' => '1', 'start_date' => $startDate, 'end_date' => $endDate]);
     //Load and login a known member
     $user = User::find(1);
     Auth::login($user);
     //I can see the menu item
     $I->amOnPage('/proposals');
     $I->canSee('Proposal 4');
     $I->seeExceptionThrown('BB\\Exceptions\\ValidationException', function ($I) {
         //Confirm that posting directly generates a validation exception
         $I->sendPOST('/proposals/4', ['vote' => '+1']);
     });
 }
开发者ID:adamstrawson,项目名称:BBMembershipSystem,代码行数:19,代码来源:ProposalsCest.php

示例7: FunctionalTester

<?php

$I = new FunctionalTester($scenario);
$I->am('an user');
$I->wantTo('Add an user to a group');
//setup
$I->amAuthenticatedWithCredentials();
$I->haveRecord('users_groups', ['name' => 'group_test', 'organization_id' => '1', 'created_at' => '2015-05-08 00:00:00', 'updated_at' => '2015-05-08 00:00:00']);
$I->amOnPage(action('UsersManagementController@index'));
$I->canSee('group_test');
$I->click('submit-usergroup-enable');
$I->canSeeElement('.alert-success');
开发者ID:iris-it,项目名称:irispass-webapp-laravel,代码行数:12,代码来源:AddUserToGroupCept.php

示例8: FunctionalTester

<?php

use BB\Entities\User;
$I = new FunctionalTester($scenario);
$I->am('a member');
$I->wantTo('update my profile photo');
//Load and login a known member
$user = User::find(1);
Auth::login($user);
$I->amOnPage('/account/' . $user->id . '/profile/edit');
$I->canSee('Profile Photo');
$I->attachFile('Profile Photo', 'test-image.png');
$I->click('Save');
$I->seeCurrentUrlEquals('/members/' . $user->id);
开发者ID:adamstrawson,项目名称:BBMembershipSystem,代码行数:14,代码来源:MemberCanUploadNewPhotoCept.php

示例9: 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

示例10: 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

示例11: 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

示例12: FunctionalTester

<?php

$I = new FunctionalTester($scenario);
$I->am('an admin user');
$I->wantTo('see the admin menu items');
$I->loginAdminMember();
$I->amOnPage('/');
$I->canSee('Manage Members');
开发者ID:adamstrawson,项目名称:BBMembershipSystem,代码行数:8,代码来源:AdminMenuItemsCept.php

示例13: FunctionalTester

<?php

$I = new FunctionalTester($scenario);
$I->am('a guest');
$I->wantTo('try and fail to view the stats page');
//I can see the menu item
$I->amOnPage('/');
$I->canSee('Stats');
//I cant access it
$I->amOnPage('/stats');
$I->canSeeCurrentUrlEquals('/login');
开发者ID:adamstrawson,项目名称:BBMembershipSystem,代码行数:11,代码来源:GuestCantAccessStatsPageCept.php

示例14: FunctionalTester

<?php

$I = new FunctionalTester($scenario);
$I->wantTo('I can see laravel 5 in homepage');
$I->amOnPage('/');
$I->canSee("Laravel 5");
开发者ID:Roinflames,项目名称:GrupoNorte,代码行数:6,代码来源:PruebaCept.php

示例15: FunctionalTester

<?php

$I = new FunctionalTester($scenario);
$I->am('a Larabook member.');
$I->wantTo('login to my Larabook account');
$I->signIn();
$I->seeInCurrentUrl('/statuses');
$I->canSee('Welcome back');
$I->assertTrue(Auth::check(), 'The user is logged in');
开发者ID:billwaddyjr,项目名称:Larabook2.0,代码行数:9,代码来源:SignInCept.php


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