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


PHP FunctionalTester::amOnPage方法代码示例

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


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

示例1: dontSeeVisualChanges

 /**
  * @param FunctionalTester $I
  */
 public function dontSeeVisualChanges(FunctionalTester $I)
 {
     $I->amOnPage('/');
     $I->dontSeeVisualChanges('same');
     // the test has to be called twice for comparison on the travis server
     $I->amOnPage('/');
     $I->dontSeeVisualChanges('same');
 }
开发者ID:nubium,项目名称:puffin,代码行数:11,代码来源:VisualChangesCest.php

示例2: checkAuthEndpoint

 public function checkAuthEndpoint(FunctionalTester $I)
 {
     $I->wantTo('Visit login endpoint');
     $I->amOnPage('login');
     $I->seeResponseCodeIs(200);
     $I->wantTo('Visit register endpoint');
     $I->amOnPage('register');
     $I->seeResponseCodeIs(200);
 }
开发者ID:inoplate,项目名称:account,代码行数:9,代码来源:AuthCest.php

示例3: requireAuthenticationForRoute

 public function requireAuthenticationForRoute(FunctionalTester $I)
 {
     $I->dontSeeAuthentication();
     $I->amOnPage('/secure');
     $I->seeCurrentUrlEquals('/auth/login');
     $I->see('Login');
     $I->amLoggedAs(User::firstOrNew($this->userAttributes));
     $I->amOnPage('/secure');
     $I->seeResponseCodeIs(200);
     $I->see('Hello World');
 }
开发者ID:jenky,项目名称:laravel-api-starter,代码行数:11,代码来源:AuthCest.php

示例4: testRegisterSuccsess

 public function testRegisterSuccsess(FunctionalTester $I)
 {
     $I->wantTo('register a user');
     $I->amOnPage('/register');
     $I->fillField('name', 'JohnDoe');
     $I->fillField('email', 'johnDoe@gmail.com');
     $I->fillField('password', 'admin');
     $I->fillField('password_confirmation', 'admin');
     $I->click('Continue');
     $I->amOnPage('/');
 }
开发者ID:nguyentantintb,项目名称:wedding-card,代码行数:11,代码来源:WeddingCardTestCest.php

示例5: requireAuthenticationForRoute

 public function requireAuthenticationForRoute(FunctionalTester $I)
 {
     $I->haveEnabledFilters();
     $I->amOnPage('/secure');
     $I->seeCurrentUrlEquals('/auth/login');
     $I->see('Login');
     $I->amLoggedAs(User::create($this->userAttributes));
     $I->amOnPage('/secure');
     $I->seeResponseCodeIs(200);
     $I->see('Hello World');
 }
开发者ID:resulaslan,项目名称:sample-l4-app,代码行数:11,代码来源:AuthCest.php

示例6: append_token_to_reset_password_route

 private function append_token_to_reset_password_route(FunctionalTester $I)
 {
     // get reset token
     $password_reset = $I->grabRecord('password_resets', ['email' => self::EMAIL]);
     // fill password reset form
     $I->amOnPage('/password/reset/' . $password_reset->token);
 }
开发者ID:neilrussell6,项目名称:l5-task-list,代码行数:7,代码来源:PasswordResetCest.php

示例7: seeContact

 /**
  * @param FunctionalTester $I
  */
 public function seeContact(FunctionalTester $I)
 {
     $I->wantToTest('if I can see the contact form as anonymous user');
     $I->amOnPage('/');
     $I->click(['link' => 'Contact']);
     $I->see('ContactForm');
 }
开发者ID:smartinmedia,项目名称:cunity-test,代码行数:10,代码来源:SmokeAnonymCest.php

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

示例9: should_correctly_route_to_index

 /** @test */
 public function should_correctly_route_to_index(FunctionalTester $I)
 {
     // given .. I am on index page
     $I->amOnPage('/');
     // then ... I should see correct route
     $I->seeCurrentUrlEquals('/');
 }
开发者ID:neilrussell6,项目名称:l5-task-list,代码行数:8,代码来源:IndexCest.php

示例10: _before

 public function _before(FunctionalTester $I)
 {
     $this->tester = ['name' => 'Tester', 'email' => 'tester+' . str_random(8) . '@stellardestiny.online', 'password' => 'password'];
     $I->amOnPage('/');
     $I->click('Register');
     $I->seeCurrentUrlEquals('/auth/register');
 }
开发者ID:stellargames,项目名称:StellarDestiny,代码行数:7,代码来源:RegistrationCest.php

示例11: seeLinksList

 public function seeLinksList(FunctionalTester $I)
 {
     $I->haveRecord('links', $this->linkRecord);
     $I->amOnPage(LinksPage::$URL);
     $I->see('Links');
     $I->see('/' . $this->link['uri']);
     $I->see($this->link['description']);
 }
开发者ID:mlanin,项目名称:go,代码行数:8,代码来源:LinksCest.php

示例12: it_should_render_extended_shortcode

 /**
  * @test
  * it should render extended shortcode
  */
 public function it_should_render_extended_shortcode(\FunctionalTester $I)
 {
     $content = 'Lorem ipsum [idlikethis]Some idea of mine[/idlikethis]';
     $post_id = $I->havePostInDatabase(['post_name' => 'foo', 'post_content' => $content]);
     $I->amOnPage('/foo');
     $text = "Some idea of mine";
     $I->seeElement('.idlikethis-button[data-post-id="' . $post_id . '"][data-text="' . $text . '"] button');
 }
开发者ID:lucatume,项目名称:idlikethis,代码行数:12,代码来源:ShortcodeCest.php

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

示例14: deletePost

 public function deletePost(FunctionalTester $I)
 {
     $id = $I->haveRecord('posts', $this->postAttributes);
     $I->amOnPage(PostsPage::$url);
     $I->see('Hello Universe');
     PostsPage::of($I)->deletePost($id);
     $I->seeCurrentUrlEquals(PostsPage::$url);
     $I->dontSee('Hello Universe');
 }
开发者ID:jenky,项目名称:laravel-api-starter,代码行数:9,代码来源:PostCrudCest.php

示例15: checkIfLogin

 /**
  * Define custom actions here
  */
 function checkIfLogin(\FunctionalTester $I)
 {
     //if ($I->loadSessionSnapshot('login')) return;
     $I->amOnPage('/login');
     $I->fillField(['name' => 'email'], Fixtures::get('username'));
     $I->fillField(['name' => 'password'], Fixtures::get('password'));
     $I->click('#loginButton');
     //$I->saveSessionSnapshot('login');
 }
开发者ID:magicians,项目名称:invoiceninja,代码行数:12,代码来源:FunctionalTester.php


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