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


PHP FunctionalTester::grabRecord方法代码示例

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


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

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

示例2: grabUser

 private function grabUser(FunctionalTester $I)
 {
     return $I->grabRecord('users', ['id' => $this->user->id]);
 }
开发者ID:furious-programming,项目名称:coyote,代码行数:4,代码来源:MicroblogsCest.php

示例3: FunctionalTester

<?php

$I = new FunctionalTester($scenario);
$I->resetEmails();
//setup
$I->am('a user');
$I->wantTo('activate my email adress');
$I->amAuthenticatedWithCredentials();
$I->canSeeAuthentication();
$I->amOnPage('/confirmation');
//action
//step1
$I->click('#submit-mail-code');
//step2
$I->seeInLastEmail('admin@irispass.fr');
$I->seeInLastEmail('Confirmation Code');
//step3
$I->seeRecord('users_confirmations', ['user_id' => 1, 'type' => 'mail']);
//step4
$code = $I->grabRecord('users_confirmations', ['user_id' => 1, 'type' => 'mail']);
$I->amOnPage('/confirmation/mail/' . $code->confirmation_code);
$I->dontSee('#submit-mail-code');
$I->seeRecord('users_profiles', ['user_id' => 1, 'mail_confirmed' => 1]);
开发者ID:iris-it,项目名称:irispass-webapp-laravel,代码行数:23,代码来源:ConfirmMailCept.php

示例4: FunctionalTester

<?php

$I = new FunctionalTester($scenario);
$I->expectTo('have a usere in the database');
$I->haveRecord('users', ['username' => 'verem', 'password' => 'danverem', 'email' => 'danverem@gmail.com', 'profile_state' => 0]);
$I->expectTo('have a logged in user');
$user = $I->grabRecord('users', ['username' => 'verem']);
$I->amLoggedAs(['username' => $user->username, 'id' => $user->id, 'password' => $user->password]);
$I->wantTo('test if chops is posting to database');
$I->amOnAction('ChopsController@create');
$I->seeInCurrentUrl('/create');
$I->see('What\'s that special meal you just ate today');
$I->fillField('name', 'edikaikong');
$I->attachFile('image', 'julia.jpeg');
$I->fillField('about', 'This food is the best dish in the country');
$I->click('submitButton');
$I->seeInCurrentUrl('/chops');
开发者ID:andela,项目名称:chopbox,代码行数:17,代码来源:CreateChopsCept.php

示例5: FunctionalTester

<?php

/**
 * Created by PhpStorm.
 * User: bill
 * Date: 26.01.15
 * Time: 11:31
 */
use app\tests\codeception\_pages\mobile\number\CreatePage;
use app\modules\mobile\models\Number;
use app\modules\mobile\models\Document;
use app\modules\directory\models\Employee;
$I = new FunctionalTester($scenario);
$I->wantTo("ensure that creation Number model works");
$owner = $I->grabRecord(Employee::className(), ['id' => 1]);
$newDocument = 'file1.jpg';
$number = '9876543210';
$I->amGoingTo("prepare database.");
Document::deleteAll(['filename' => $newDocument]);
Number::deleteAll(['number' => $number]);
$page = CreatePage::openBy($I);
$I->dontSeeElement("input[type=file]");
$I->dontSeeElement("#documents-panel-body");
$I->dontSeeElement("#history-panel-body");
$page->submit(['number' => $number, 'ownerName' => $owner->fullName, 'ownerPost' => $owner->post, 'operatorId' => 'operator2', 'destination' => Number::DESTINATION_MODEM, 'limit' => "1000", 'options' => [Number::OPTION_ACCOUNTING, Number::OPTION_DIRECTORY], 'comment' => 'This is comment of testing number.']);
$I->SeeRecord(Number::className(), ['number' => $number, 'ownerId' => 1, 'operatorId' => 'operator2', 'destination' => Number::DESTINATION_MODEM, 'limit' => 1000, 'options' => [Number::OPTION_ACCOUNTING, Number::OPTION_DIRECTORY], 'history' => [['ownerId' => 'employee1', 'rentDate' => time()]], 'comment' => 'This is comment of testing number.']);
$I->see("Номер успешно создан", '.alert-success');
$I->seeInField($page->fieldSelector('ownerName'), $owner->fullName);
$I->seeInField($page->fieldSelector('ownerPost'), $owner->posts[1]);
$I->seeOptionIsSelected($page->fieldSelector('operatorId'), "Оператор 2");
$I->seeOptionIsSelected($page->fieldSelector('destination'), Number::DESTINATION_MODEM);
开发者ID:shubnikofff,项目名称:mobiles,代码行数:31,代码来源:CreateCept.php

示例6: it_successfully_changes_password_from_password_change_form

 public function it_successfully_changes_password_from_password_change_form(FunctionalTester $I)
 {
     $email = 'email@example.com';
     //Existing record in DB
     $resetRecord = $I->grabRecord('password_resets', ['email' => $email]);
     $I->amOnPage(PasswordChangePage::$PAGE_PLAIN . $resetRecord->token);
     $I->fillField('email', $email);
     $I->fillField('password', '123456');
     $I->fillField('password_confirmation', '123456');
     $I->submitForm(PasswordChangePage::$formId, [], PasswordChangePage::$submit);
     $I->see('Password successfully reset. You can now login.');
 }
开发者ID:v-radev,项目名称:laravel-auth-pack,代码行数:12,代码来源:ResetFunctionalCest.php

示例7: FunctionalTester

<?php

$I = new FunctionalTester($scenario);
$I->wantTo('remind my password');
$user = $I->haveRecord('users', ['name' => 'Joe Doe', 'email' => 'joe@doe.com', 'password' => bcrypt('123'), 'created_at' => new DateTime(), 'updated_at' => new DateTime(), 'is_confirm' => 1]);
$I->amOnPage('/Password');
$I->fillField('email', 'joe@doe.com');
$I->click('button[type=submit]');
$I->see('Na podany adres e-mail wysłane zostały dalsze instrukcje');
$I->seeRecord('password_resets', ['email' => 'joe@doe.com']);
$record = $I->grabRecord('password_resets', ['email' => 'joe@doe.com']);
$I->amOnPage('Password/reset/' . $record->token);
$I->fillField('email', 'joe@doe.com');
$I->fillField('password', '1234');
$I->fillField('password_confirmation', '1234');
$I->click('button[type=submit]');
$I->see('Hasło zostało prawidłowo ustawione');
开发者ID:furious-programming,项目名称:coyote,代码行数:17,代码来源:PasswordCept.php


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