本文整理汇总了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');
}
示例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');
}
示例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');
}
示例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');
})
);
*/
}
示例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');
}
示例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']);
});
}
示例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');
示例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);
示例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);
示例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);
示例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');
示例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');
示例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');
示例14: FunctionalTester
<?php
$I = new FunctionalTester($scenario);
$I->wantTo('I can see laravel 5 in homepage');
$I->amOnPage('/');
$I->canSee("Laravel 5");
示例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');