本文整理汇总了PHP中FunctionalTester::cantSee方法的典型用法代码示例。如果您正苦于以下问题:PHP FunctionalTester::cantSee方法的具体用法?PHP FunctionalTester::cantSee怎么用?PHP FunctionalTester::cantSee使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FunctionalTester
的用法示例。
在下文中一共展示了FunctionalTester::cantSee方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: memberCantCreateEntry
public function memberCantCreateEntry(FunctionalTester $I)
{
$I->am('a member');
$I->wantTo('make sure I cant create an equipment entry');
//Load and login a known member
$I->loginNormalMember();
$I->amOnPage('/equipment');
$I->cantSee('Record a new item');
$I->amOnPage('/equipment/create');
$I->canSeeResponseCodeIs(403);
}
示例2: 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');
}
示例3: memberCantAddCash
public function memberCantAddCash(FunctionalTester $I)
{
$I->am('a member');
$I->wantTo('make sure I cant add cash payments to my account');
//Load and login a known member
$user = User::find(1);
Auth::login($user);
//I cant see option
$I->amOnPage('/account/' . $user->id . '');
$I->cantSee('Record a cash balance payment');
//Make sure they cant post payment directly
//Confirm that posting directly generates a validation exception
$I->sendPOST('/account/' . $user->id . '/payment/cash/create', ['reason' => 'balance', 'amount' => 4.69, 'return_path' => '/']);
$I->seeResponseCodeIs(403);
//One final check
$I->cantSeeInDatabase('payments', ['amount' => 4.69]);
}
示例4: memberCanReturnBox
public function memberCanReturnBox(FunctionalTester $I)
{
$I->am('a member');
$I->wantTo('make sure I can return a box I own');
//Load and login a known member
$user = User::find(1);
$I->amLoggedAs($user);
//Setup a box a already claimed
$box = \BB\Entities\StorageBox::first();
$box->user_id = $user->id;
$box->save();
$I->amOnPage('/storage_boxes');
//Make sure the db is correct
$I->seeInDatabase('storage_boxes', ['user_id' => $user->id]);
//The page should have our name next to the claimed box
$I->see($user->name);
$I->click('Return Box');
//We should be gone from the DB
$I->dontSeeInDatabase('storage_boxes', ['user_id' => $user->id]);
$I->cantSee($user->name);
}
示例5: adminCantEditStartedProposal
public function adminCantEditStartedProposal(FunctionalTester $I)
{
$I->am('an admin');
$I->wantTo('make sure I cannt edit a proposal thats been started');
//Create a proposal that's currently open
$startDate = Carbon::now()->subDays(2)->format('Y-m-d');
$endDate = Carbon::now()->addDays(2)->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->cantSee('Edit Proposal');
}
示例6: search_user
public function search_user(FunctionalTester $I)
{
$I->am('Admin');
$I->wantTo('search a user');
$I->expectTo('see the searched user');
/***************************************************************************************************************
* settings
**************************************************************************************************************/
// we create the admin role and attach the logged user to it
$admin_role = $this->_createAdminRole();
$admin_role->users()->attach($this->_user);
// we create a new user
$credentials = ['last_name' => 'Autre', 'first_name' => 'autre', 'email' => 'autre@autre.fr', 'status_id' => config('user.status_key.communication_commission'), 'board_id' => config('user.board_key.leading_board'), 'password' => 'autre'];
$user1 = \Sentinel::register($credentials, true);
// we create another user
$credentials = ['last_name' => 'Other', 'first_name' => 'other', 'email' => 'other@other.fr', 'status_id' => config('user.status_key.communication_commission'), 'board_id' => config('user.board_key.leading_board'), 'password' => 'other'];
$user2 = \Sentinel::register($credentials, true);
/***************************************************************************************************************
* run test
**************************************************************************************************************/
$I->amOnRoute('users.index');
$I->see(strip_tags(trans('global.table_list.results.status', ['start' => 1, 'stop' => 2, 'total' => 2])));
$I->see($user1->last_name, '.table-list');
$I->see($user1->first_name, '.table-list');
$I->see($user2->last_name, '.table-list');
$I->see($user2->first_name, '.table-list');
$I->seeInField('#input_lines', config('tablelist.default.lines'));
$I->seeInField('#input_search', '');
$I->fillField('#input_search', 'oth');
$I->submitForm('#line_search_form', []);
$I->cantSee($user1->last_name, '.table-list');
$I->cantSee($user1->first_name, '.table-list');
$I->see($user2->last_name, '.table-list');
$I->see($user2->first_name, '.table-list');
$I->see(strip_tags(trans('global.table_list.results.status', ['start' => 1, 'stop' => 1, 'total' => 1])));
}
示例7: FunctionalTester
<?php
$I = new FunctionalTester($scenario);
$I->am('member');
$I->wantTo('confirm I can see member menu items only');
$I->loginNormalMember();
$I->amOnPage('/');
$I->canSeeLink('Your Membership');
$I->canSeeLink('Logout');
$I->cantSee('Admin');