當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。