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


PHP FunctionalTester::seeRecord方法代碼示例

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


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

示例1: it_successfully_sends_password_reset_mail_link

 public function it_successfully_sends_password_reset_mail_link(FunctionalTester $I)
 {
     $I->amOnRoute(PasswordResetPage::$ROUTE);
     $I->fillField('email', 'email@example.com');
     $I->submitForm(PasswordResetPage::$formId, [], PasswordResetPage::$submit);
     $I->see('Reset link was successfully sent. Please check your email.');
     $I->seeRecord('password_resets', ['email' => 'email@example.com']);
 }
開發者ID:v-radev,項目名稱:laravel-auth-pack,代碼行數:8,代碼來源:ResetFunctionalCest.php

示例2: createUser

 public function createUser(FunctionalTester $I)
 {
     $I->amOnRoute('site/login');
     $I->submitForm($this->loginFormId, $this->loginFormParams('admin@example.org', '123123'));
     $I->amOnRoute('/admin/user/create');
     $I->see('Create User');
     $I->submitForm($this->createUserFormId, $this->createUserFormParams('created-user', 'created-user@example.com', '123123'));
     $I->seeRecord('app\\models\\UserModel', ['username' => 'created-user', 'email' => 'created-user@example.com']);
 }
開發者ID:yii2mod,項目名稱:base,代碼行數:9,代碼來源:CreateUserCest.php

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

示例4: addTag

 /**
  * @param FunctionalTester $I
  *
  * @actor FunctionalTester
  *
  * @return void
  */
 public function addTag(FunctionalTester $I)
 {
     $I->am('Admin User');
     $I->wantTo('add new tag');
     $tag = new Tag();
     $group = $tag->getGroups()->random(1);
     $data = ['name' => 'tag1', 'group' => $group->id, 'bgcolor' => 'red'];
     $I->amLoggedAs($I->createUser(1, 4));
     $I->amOnAction('Administration\\TagsController@getNew');
     $I->submitForm('form', $data);
     $I->seeCurrentActionIs('Administration\\TagsController@getIndex');
     $I->seeRecord($tag->getTable(), $data);
 }
開發者ID:oliverpool,項目名稱:tinyissue,代碼行數:20,代碼來源:CrudTagCest.php

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

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

示例7: it_successfully_detaches_permission

 public function it_successfully_detaches_permission(FunctionalTester $I)
 {
     $user = $this->userActor->create();
     $permission = 'accessDashboard';
     $permissionId = Permission::where('name', '=', $permission)->firstOrFail()->id;
     $user->setRole('admin');
     $I->assertTrue($user->attachPermission($permission));
     $I->seeRecord($this->UPT, ['user_id' => $user->id, 'permission_id' => $permissionId]);
     $user->detachPermission($permission);
     $I->dontSeeRecord($this->UPT, ['user_id' => $user->id, 'permission_id' => $permissionId]);
 }
開發者ID:v-radev,項目名稱:laravel-auth-pack,代碼行數:11,代碼來源:AccessControlFunctionalCest.php

示例8: FunctionalTester

<?php

$I = new FunctionalTester($scenario);
$I->wantTo('manually shorten a url');
$I->amOnPage('/');
$I->fillField('.shortInput', 'http://www.example.com');
$I->click('Go');
$I->amOnPage('/');
$I->see('http://localhost', '.result');
$hash = $I->grabTextFrom('~http://localhost/([^\\<]+)~');
$I->seeRecord('urls', ['url' => 'http://www.example.com', 'hash' => $hash]);
開發者ID:corbosman,項目名稱:shorternet,代碼行數:11,代碼來源:ShortenManualCept.php

示例9: FunctionalTester

<?php

$I = new FunctionalTester($scenario);
$I->am('a Administrator user');
$I->dontSeeAuthentication();
$I->amLoggedAs(['email' => 'admin@admin.com', 'password' => 'admin']);
$I->seeAuthentication();
//When
$I->amOnPage('/settings/users');
//And
$I->click('Create');
//Then
$I->seeCurrentUrlEquals('/settings/users/create');
//when
$form = ['name' => 'Mario', 'email' => 'mario@test.com'];
//And
$I->submitForm('//form', $form, 'Save');
//Then
$I->seeFormErrorMessage('password', 'The Password field is required.');
//When
$form = ['name' => 'Mario', 'email' => 'mario@test.com', 'password' => '123456', 'password_confirmation' => '123456'];
//and
$I->submitForm('//form', $form, 'Save');
//then
$I->seeCurrentUrlEquals('/settings/users');
$I->see('Mario');
$I->seeRecord('users', ['name' => 'Mario', 'email' => 'mario@test.com']);
開發者ID:raulbravo23,項目名稱:salepoint,代碼行數:27,代碼來源:CreateUserCept.php

示例10: FunctionalTester

<?php

$I = new FunctionalTester($scenario);
//setup
$I->am('a guest');
$I->wantTo('register an account');
//action
$I->amOnPage('/register');
$I->see('Inscription');
$I->fillField(['name' => 'firstname'], 'John');
$I->fillField(['name' => 'lastname'], 'Doe');
$I->fillField(['name' => 'email'], 'john.doe@mail.com');
$I->fillField(['name' => 'password'], 'password');
$I->fillField(['name' => 'password_confirmation'], 'password');
$I->click('submit-register');
//verify
$I->canSeeAuthentication();
$I->seeRecord('users', array('email' => 'john.doe@mail.com'));
開發者ID:iris-it,項目名稱:irispass-webapp-laravel,代碼行數:18,代碼來源:RegisterCept.php

示例11:

$I->seeCurrentUrlEquals('/admin/sections/' . $id . '/edit');
$I->see('Edit section "Our company"', 'h1');
$I->seeInField('name', 'Our company');
$I->seeInField('slug_url', 'our-company');
$I->seeInField('menu_order', 2);
$I->seeOptionIsSelected('published', 0);
$I->seeOptionIsSelected('menu', 1);
$I->seeOptionIsSelected('type', 'Page');
$I->amGoingTo('Submit an invalid form');
// When
$I->fillField('name', '');
// And
$I->click('Update section');
// Then
$I->expectTo('see the form back with data and errors');
$I->seeCurrentUrlEquals('/admin/sections/' . $id . '/edit');
$I->seeInField('name', '');
$I->seeInField('slug_url', 'our-company');
$I->see('The name field is required', '.error');
$I->amGoingTo('Submit a valid form');
// When
$I->fillField('name', 'Who we are');
$I->selectOption('published', 1);
// And
$I->click('Update section');
// Then
$I->expectTo('see the section details with the new changes');
$I->seeCurrentUrlEquals('/admin/sections/' . $id);
$I->see('Who we are', 'h1');
$I->seeRecord('sections', ['id' => $id, 'name' => 'Who we are', 'published' => 1, 'slug_url' => 'our-company', 'type' => 'page', 'menu_order' => 2, 'menu' => 1]);
開發者ID:mathiasd88,項目名稱:cms,代碼行數:30,代碼來源:UpdateSectionCept.php

示例12: FunctionalTester

<?php

/**
 * ------------------------------------
 *          Testing User Show
 * ------------------------------------
 */
$I = new FunctionalTester($scenario);
$I->am('as a visitor');
$I->wantTo('See a user profile.');
$user = $I->have('User', ['name' => 'SuperMeOriganal2', 'created_at' => Carbon::now()->toDateTimeString()]);
$I->seeRecord('users', ['id' => $user->id]);
$I->amOnRoute('users.show', $user->id);
$I->see('SuperMeOriganal2');
開發者ID:TopJohn,項目名稱:phphub,代碼行數:14,代碼來源:UserShowCept.php

示例13: FunctionalTester

<?php 
$I = new FunctionalTester($scenario);
$I->wantTo('Sign up for a larabook account');

$I->amOnPage('/');
$I->click('Sign Up!');
$I->seeCurrentUrlEquals('/register');

$I->fillField('username', 'JohnDoe');
$I->fillField('email', 'John@example.com');
$I->fillField('password', 'demo');
$I->fillField('password_confirmation', 'demo');
$I->click('Sign Up');

$I->seeCurrentUrlEquals('');
$I->see('Welcome to Larabook!');
$I->seeRecord('users', [
   'username' => 'JohnDoe',
   'email' => 'john@example.com'
]);

開發者ID:stoodz,項目名稱:larabook,代碼行數:20,代碼來源:SignUpCept.php

示例14: get_forgotten_password_email_with_recorded_email

 public function get_forgotten_password_email_with_recorded_email(FunctionalTester $I)
 {
     $I->am('Unlogged user');
     $I->wantTo('receive my password reset email by using the forgotten password feature');
     $I->expectTo('see a success confirmation message explaining that the e-mail has been sent');
     /***************************************************************************************************************
      * settings
      **************************************************************************************************************/
     $I->resetEmails();
     /***************************************************************************************************************
      * run test
      **************************************************************************************************************/
     $I->amOnPage('/');
     $I->seeCurrentRouteIs('home');
     $I->click(trans('template.front.header.my_account'));
     $I->seeCurrentRouteIs('login.index');
     $I->fillField('email', $this->_user->email);
     $I->fillField('password', 'truc');
     $I->click(trans('auth.login.action.login'));
     $I->seeCurrentRouteIs('login.index');
     $I->see(trans('global.modal.alert.title.error'));
     $I->click(trans('auth.login.label.forgotten_password'));
     $I->seeCurrentRouteIs('password.index');
     $I->seeInField('email', $this->_user->email);
     $I->click(trans('auth.password.forgotten.action.send'));
     $I->see(trans('global.modal.alert.title.success'), 'h3');
     $I->see(strip_tags(trans('auth.message.password_reset.email.success', ['email' => 'test@test.fr'])));
     $I->seeCurrentRouteIs('login.index');
     $I->seeRecord('reminders', ['user_id' => $this->_user->id, 'completed' => false]);
     $I->seeInLastEmailTo($this->_user->email, htmlentities(trans('emails.password_reset.title')), 'h3');
     $I->seeInLastEmailTo($this->_user->email, htmlentities(trans('emails.password_reset.hello', ['name' => $this->_user->first_name . ' ' . $this->_user->last_name])), 'p');
     $I->seeInLastEmailTo($this->_user->email, trans('emails.password_reset.content'), 'p');
     $I->seeInLastEmailTo($this->_user->email, htmlentities(trans('emails.password_reset.button')), 'button');
 }
開發者ID:Okipa,項目名稱:una.app,代碼行數:34,代碼來源:AuthCest.php

示例15: FunctionalTester

<?php

$I = new FunctionalTester($scenario);
$I->wantTo('register a user from index page');
$I->expectTo('have a users in the database');
$I->amOnPage('/');
$I->haveRecord('users', ['email' => 'andela@andela.com', 'username' => 'andelabendozy', 'password' => bcrypt('password'), 'created_at' => new DateTime(), 'updated_at' => new DateTime(), 'status' => TRUE, 'profile_state' => FALSE]);
$I->submitForm('form#register', ['name' => 'prosper', 'email' => 'andela11@andela.com', 'password' => '12345678', 'password_confirmation' => '12345678']);
$I->seeAuthentication();
$I->seeCurrentUrlEquals('');
$I->seeRecord('users', ['email' => 'andela@andela.com']);
$I->seeAuthentication();
$I->wantTo('logout');
$I->logout();
$I->dontSeeAuthentication();
開發者ID:andela,項目名稱:chopbox,代碼行數:15,代碼來源:RegisterFromIndexCept.php


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