當前位置: 首頁>>代碼示例>>PHP>>正文


PHP FunctionalTester::seeAuthentication方法代碼示例

本文整理匯總了PHP中FunctionalTester::seeAuthentication方法的典型用法代碼示例。如果您正苦於以下問題:PHP FunctionalTester::seeAuthentication方法的具體用法?PHP FunctionalTester::seeAuthentication怎麽用?PHP FunctionalTester::seeAuthentication使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在FunctionalTester的用法示例。


在下文中一共展示了FunctionalTester::seeAuthentication方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: _after

 public function _after(FunctionalTester $I)
 {
     $I->amOnPage(PostsPage::$url);
     $I->seeCurrentUrlEquals(PostsPage::$url);
     $I->seeAuthentication();
     $I->logout();
     $I->dontSeeAuthentication();
 }
開發者ID:jenky,項目名稱:laravel-api-starter,代碼行數:8,代碼來源:AuthCest.php

示例2: createATicketSuccessfully

 public function createATicketSuccessfully(FunctionalTester $I)
 {
     $I->amLoggedAs(User::where('email', 'wayne@chargemasterplc.com')->first());
     $I->seeAuthentication();
     $I->amOnPage('/ticket/create');
     $I->see('Create Ticket', 'h1');
     $I->fillField('customer_name', 'Evie Martell');
     $I->fillField('customer_address', 'Luton, LU1 9AB');
     $I->fillField('customer_tel', '07710999888');
     $I->fillField('customer_email', 'evie.martell@chargemasterplc.com');
     $I->selectOption('select[name=type]', 'Fault');
     $I->selectOption('select[name=category_id]', '1');
     $I->fillField('post_serial', '2997');
     $I->fillField('description', 'Testing the post fault');
     $I->seeAuthentication();
     $I->click('Create');
     $I->see('Ticket created');
 }
開發者ID:richmartell,項目名稱:laravel,代碼行數:18,代碼來源:TicketCest.php

示例3: trySigninWithDifferentRole

 public function trySigninWithDifferentRole(FunctionalTester $I)
 {
     $I->wantTo('Login as user with different role');
     $I->dontSeeAuthentication();
     $I->amOnPage('/login');
     $I->fillField('identifier', 'spectator');
     $I->fillField('password', '123456');
     $I->click('button[type=submit]');
     $I->seeCurrentUrlEquals('/admin/profile');
     $I->seeAuthentication();
 }
開發者ID:inoplate,項目名稱:account,代碼行數:11,代碼來源:LoginCest.php

示例4: testValidRegistration

 public function testValidRegistration(FunctionalTester $I)
 {
     $I->fillField('name', $this->tester['name']);
     $I->fillField('email', $this->tester['email']);
     $I->fillField('password', $this->tester['password']);
     $I->fillField('password_confirmation', $this->tester['password']);
     $I->click('Register', 'button');
     $I->dontSeeFormErrors();
     $I->seeRecord('users', ['name' => $this->tester['name'], 'email' => $this->tester['email']]);
     $I->seeAuthentication();
 }
開發者ID:stellargames,項目名稱:StellarDestiny,代碼行數:11,代碼來源:RegistrationCest.php

示例5: testLoginSuccsess

 public function testLoginSuccsess(FunctionalTester $I)
 {
     $I->wantTo('login as a user');
     $I->haveRecord('users', ['name' => 'john', 'email' => 'john@gmail.com', 'password' => bcrypt('123456'), 'created_at' => new DateTime(), 'updated_at' => new DateTime()]);
     $I->amOnPage('auth/login');
     $I->fillField('email', 'john@gmail.com');
     $I->fillField('password', '123456');
     $I->click('Login');
     $I->amOnPage('/');
     $I->seeAuthentication();
 }
開發者ID:nguyentantintb,項目名稱:wedding-card,代碼行數:11,代碼來源:WeddingCardTestCest.php

示例6: loginUsingCredentials

 public function loginUsingCredentials(FunctionalTester $I)
 {
     $I->dontSeeAuthentication();
     $I->haveRecord('users', $this->userAttributes);
     $I->amLoggedAs(['email' => 'john@doe.com', 'password' => 'password']);
     $I->amOnPage(PostsPage::$url);
     $I->seeCurrentUrlEquals(PostsPage::$url);
     $I->seeAuthentication();
     $I->logout();
     $I->dontSeeAuthentication();
 }
開發者ID:resulaslan,項目名稱:sample-l4-app,代碼行數:11,代碼來源:AuthCest.php

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

示例8: registrationWorks

 public function registrationWorks(FunctionalTester $I)
 {
     $I->amOnPage('/auth/register');
     $I->dontSeeAuthentication();
     $I->see('Register', 'h1');
     $I->fillField('name', 'Wayne');
     $I->fillField('email', 'simon@chargemasterplc.com');
     $I->fillField('password', 'secret');
     $I->fillField('password_confirmation', 'secret');
     $I->click('Register');
     $I->seeCurrentUrlEquals('/dashboard');
     $I->see('This is the dashboard');
     $I->seeAuthentication();
 }
開發者ID:richmartell,項目名稱:laravel,代碼行數:14,代碼來源:AuthCest.php

示例9: FunctionalTester

<?php

$I = new FunctionalTester($scenario);
$I->wantTo('create a currency without data');
$I->am('a Administrator user');
$I->dontSeeAuthentication();
$I->amLoggedAs(['email' => 'admin@admin.com', 'password' => 'admin']);
$I->seeAuthentication();
//When
$I->amOnPage('/settings/currency');
//And
$I->see('Create');
$I->click('Create');
//Then
$I->seeCurrentUrlEquals('/settings/currency/create');
//When
$form = ['name' => '', 'symbol' => ''];
//And
$I->submitForm('//form', $form, 'Create');
//Then
$I->seeFormErrorMessage('name', 'The name field is required.');
//
開發者ID:raulbravo23,項目名稱:salepoint,代碼行數:22,代碼來源:CreateCurrencyWithOutDataCept.php


注:本文中的FunctionalTester::seeAuthentication方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。