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


PHP FunctionalTester::seeCurrentUrlEquals方法代码示例

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


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

示例1: _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

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

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

示例4: openPageByRoute

 public function openPageByRoute(FunctionalTester $I)
 {
     $I->amOnRoute('front.contact');
     $I->see('Contact Us');
     $I->see('Send us a message and let us know how we can help.');
     $I->seeCurrentUrlEquals('/contact-us');
 }
开发者ID:codeception,项目名称:phalcon-demo,代码行数:7,代码来源:RoutesCest.php

示例5: redirectToLogin

 /**
  * @param FunctionalTester $I
  *
  * @return void
  */
 public function redirectToLogin(FunctionalTester $I)
 {
     $I->wantTo('be redirected to login page.');
     $I->amOnAction('HomeController@getDashboard');
     $I->dontSeeAuthentication();
     $I->see('Login');
     $I->seeCurrentUrlEquals('');
 }
开发者ID:oliverpool,项目名称:tinyissue,代码行数:13,代码来源:LoginCest.php

示例6: trySigninWithInvalidCredentials

 public function trySigninWithInvalidCredentials(FunctionalTester $I)
 {
     $I->wantTo('Login as user with invalid credentials');
     $I->dontSeeAuthentication();
     $I->amOnPage('/login');
     $I->fillField('identifier', 'spectator');
     $I->fillField('password', 'invalid');
     $I->click('button[type=submit]');
     $I->seeCurrentUrlEquals('/login');
     $I->dontSeeAuthentication();
 }
开发者ID:inoplate,项目名称:account,代码行数:11,代码来源:LoginCest.php

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

示例8: requireAuthenticationForSecureRoute

 public function requireAuthenticationForSecureRoute(FunctionalTester $I)
 {
     $I->dontSeeAuthentication();
     $I->amOnPage(LinksPage::$URL);
     $I->seeCurrentUrlEquals(LoginPage::$URL);
     $I->see(LoginPage::$title);
     LoginPage::of($I)->loginByCredentials(env('LDAP_ADMIN_USER'), env('LDAP_ADMIN_PASSWORD'));
     $I->amOnPage(LinksPage::$URL);
     $I->seeResponseCodeIs(200);
     $I->see(LinksPage::$title);
 }
开发者ID:mlanin,项目名称:go,代码行数:11,代码来源:AuthCest.php

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

示例10: financeMemberCanVisitPaymentPage

 public function financeMemberCanVisitPaymentPage(FunctionalTester $I)
 {
     $I->am('a member of the finance group');
     $I->wantTo('make sure I can view the payments page');
     //Load and login a known member
     $user = User::find(3);
     $role = Role::findByName('finance');
     $role->users()->attach($user->id);
     Auth::login($user);
     $I->amOnPage('/payments');
     $I->seeCurrentUrlEquals('/payments');
     $I->see('Payments');
 }
开发者ID:adamstrawson,项目名称:BBMembershipSystem,代码行数:13,代码来源:AdminPaymentsManagementCest.php

示例11: tryToResetPasswordWithValidToken

 public function tryToResetPasswordWithValidToken(FunctionalTester $I)
 {
     $I->seeRecord('password_resets', ['email' => 'admin@site.com']);
     $I->wantTo('Reset my password invalid token');
     $I->amOnPage('/password/reset/reset-token');
     $I->fillField('email', 'admin@site.com');
     $I->fillField('password', '123456');
     $I->fillField('password_confirmation', '123456');
     $I->click('button[type=submit]');
     $I->dontSeeRecord('password_resets', ['email' => 'admin@site.com']);
     $I->seeAuthentication();
     $I->seeCurrentUrlEquals('/admin/dashboard');
 }
开发者ID:inoplate,项目名称:account,代码行数:13,代码来源:PasswordCest.php

示例12: tryRegisterDesiredInputWithDefaultRole

 public function tryRegisterDesiredInputWithDefaultRole(FunctionalTester $I)
 {
     $I->haveRecord('roles', ['id' => 2, 'name' => 'Spectator', 'slug' => 'spectator', 'landing' => 'admin/profile', 'is_default' => true, 'created_at' => new DateTime(), 'updated_at' => new DateTime()]);
     $I->wantTo('Register a user with desired input');
     $I->amOnPage('/register');
     $I->fillField('username', 'usertest');
     $I->fillField('email', 'usertest@email.com');
     $I->fillField('password', '123456');
     $I->fillField('password_confirmation', '123456');
     $I->click('button[type=submit]');
     $I->seeRecord('users', ['username' => 'usertest']);
     $I->seeCurrentUrlEquals('/login');
 }
开发者ID:inoplate,项目名称:account,代码行数:13,代码来源:RegisterCest.php

示例13: FunctionalTester

<?php

$I = new FunctionalTester($scenario);
$I->wantTo('I am Admin and Delete a new currency');
$I->dontSeeAuthentication();
$I->amLoggedAs(['email' => 'admin@admin.com', 'password' => 'admin']);
$I->seeAuthentication();
$I->amOnPage('/settings/currency/create');
//when
$form = ['name' => 'Mau', 'symbol' => '@'];
//And
$id = $I->haveRecord('currencys', ['name' => 'Mau', 'symbol' => '@']);
//And
$I->amOnPage('/settings/currency/' . $id);
//then
$I->see('Delete');
//When
$I->submitForm('//form', ['id' => $id], 'Delete');
$I->seeCurrentUrlEquals('/settings/currency');
开发者ID:raulbravo23,项目名称:salepoint,代码行数:19,代码来源:DeleteCurrencyCept.php

示例14: FunctionalTester

<?php

$I = new FunctionalTester($scenario);
$I->am('a Larabook member');
$I->wantTo('post statuses to my profile');
$I->signIn();
$I->amOnPage('statuses');
$I->postAStatus('My first post.');
$I->seeCurrentUrlEquals('/statuses');
$I->see('My first post');
开发者ID:billwaddyjr,项目名称:Larabook2.0,代码行数:10,代码来源:PostStatusCept.php

示例15: FunctionalTester

<?php

use Laracasts\TestDummy\Factory;
$I = new FunctionalTester($scenario);
$I->am('a USC Todo member');
$I->wantTo('post a new project');
$email = 'foo@example.com';
$password = 'foobar';
Factory::create('App\\User', ['email' => $email, 'password' => $password]);
$I->amOnPage('/auth/login');
$I->fillField('email', $email);
$I->fillField('password', $password);
$I->click('Login!');
//$I->signIn();
$I->seeCurrentUrlEquals('/projects');
开发者ID:AaronDhiman,项目名称:usc-todo,代码行数:15,代码来源:PostProjectCept.php


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