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


PHP AcceptanceTester::amOnRoute方法代码示例

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


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

示例1: it_validates_required_fields

 public function it_validates_required_fields(AcceptanceTester $I)
 {
     $I->amOnRoute(LoginPage::$ROUTE);
     $I->submitForm(LoginPage::$formId, [], 'Login');
     $I->see('The username field is required.');
     $I->see('The password field is required.');
 }
开发者ID:v-radev,项目名称:laravel-auth-pack,代码行数:7,代码来源:LoginAcceptanceCest.php

示例2: likes

 public function likes(\AcceptanceTester $I)
 {
     $answer = App\Models\Answer::get()->random();
     $user = App\Models\User::get()->random();
     \Auth::login($user);
     $likes = $answer->likes->count();
     $I->wantTo('like answer');
     $I->amOnRoute('q', ['id' => $answer->question->id]);
     $I->see($answer->question->title);
     $c = $likes ? (int) $I->grabTextFrom('li#answer_' . $answer->id . ' a.btn_like .like_count') : 0;
     $I->assertEquals($likes, $c);
     $I->click('li#answer_' . $answer->id . ' a.btn_like');
     $I->amOnRoute('q', ['id' => $answer->question->id]);
     $answer = App\Models\Answer::find($answer->id);
     $I->assertEquals($likes + 1, $answer->likes->count());
 }
开发者ID:gultaj,项目名称:toster,代码行数:16,代码来源:LikesCest.php

示例3: it_prevents_guests_from_seeing_profiles

 public function it_prevents_guests_from_seeing_profiles(AcceptanceTester $I)
 {
     $user = $this->userActor->create();
     $I->amOnRoute('profile.show', $user->username);
     $I->seeInCurrentUrl('auth/login');
     $I->seeCurrentRouteIs('auth.login');
     $I->dontSee('Profile of user');
 }
开发者ID:v-radev,项目名称:laravel-auth-pack,代码行数:8,代码来源:ProfileAcceptanceCest.php

示例4: it_registers_successfully

 public function it_registers_successfully(AcceptanceTester $I)
 {
     $userActor = new \Actors\UserActor();
     $I->amOnRoute(RegisterPage::$ROUTE);
     $userActor->fillRegisterPageFields($I);
     $I->submitForm(RegisterPage::$formId, [], 'Register');
     $I->see('View profile');
     $I->see('Edit profile');
     $I->see('Logout');
 }
开发者ID:v-radev,项目名称:laravel-auth-pack,代码行数:10,代码来源:RegisterAcceptanceCest.php

示例5: it_validates_required_password_reset_form_email_field

 public function it_validates_required_password_reset_form_email_field(AcceptanceTester $I)
 {
     $I->amOnRoute(PasswordResetPage::$ROUTE);
     $I->submitForm(PasswordResetPage::$formId, [], PasswordResetPage::$submit);
     $I->see('The email field is required.');
 }
开发者ID:v-radev,项目名称:laravel-auth-pack,代码行数:6,代码来源:ResetFunctionalCest.php


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