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


PHP FunctionalTester::submitForm方法代码示例

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


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

示例1: checkCorrectChangePassword

 public function checkCorrectChangePassword(FunctionalTester $I)
 {
     $I->submitForm('#login-form', $this->loginFormParams('test-user@example.com', '123123'));
     $I->click('My Account');
     $I->submitForm('#change-password-form', $this->resetPasswordFormParams('123456', '123456'));
     $I->see('Password has been updated.');
 }
开发者ID:yii2mod,项目名称:base,代码行数:7,代码来源:ChangePasswordViaAccountPageCest.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: submitFormSuccessfully

 public function submitFormSuccessfully(\FunctionalTester $I)
 {
     $I->submitForm('#contact-form', ['ContactForm[name]' => 'tester', 'ContactForm[email]' => 'tester@example.com', 'ContactForm[subject]' => 'test subject', 'ContactForm[body]' => 'test content', 'ContactForm[verifyCode]' => 'testme']);
     $I->seeEmailIsSent();
     $I->dontSeeElement('#contact-form');
     $I->see('Thank you for contacting us. We will respond to you as soon as possible.');
 }
开发者ID:chizdrel,项目名称:yii2-app-basic,代码行数:7,代码来源:ContactFormCest.php

示例4: checkValidLogin

 public function checkValidLogin(FunctionalTester $I)
 {
     $I->submitForm('#login-form', $this->formParams('admin@example.org', '123123'));
     $I->see('Logout (admin)', 'form button[type=submit]');
     $I->dontSeeLink('Login');
     $I->dontSeeLink('Signup');
 }
开发者ID:yii2mod,项目名称:base,代码行数:7,代码来源:LoginCest.php

示例5: it_validates_required_fields

 public function it_validates_required_fields(FunctionalTester $I)
 {
     //For coverage
     $I->amOnRoute(RegisterPage::$ROUTE);
     $I->submitForm(RegisterPage::$formId, [], 'Register');
     $I->see('The username field is required.');
     $I->see('The email field is required.');
     $I->see('The password field is required.');
     $I->dontSee('The name field is required.');
 }
开发者ID:v-radev,项目名称:laravel-auth-pack,代码行数:10,代码来源:RegisterFunctionalCest.php

示例6: checkAdminPanel

 public function checkAdminPanel(FunctionalTester $I)
 {
     $I->submitForm($this->formId, $this->formParams('admin@example.org', '123123'));
     $I->see('Logout (admin)', 'form button[type=submit]');
     $I->seeLink('Administration');
     $I->click('Administration');
     $I->see('Users');
     $I->seeLink('CMS');
     $I->seeLink('RBAC');
     $I->seeLink('Settings Storage');
     $I->seeLink('Cron Schedule Log');
 }
开发者ID:yii2mod,项目名称:base,代码行数:12,代码来源:AdminLoginCest.php

示例7: addNote

 /**
  * @param FunctionalTester $I
  *
  * @actor FunctionalTester
  *
  * @return void
  */
 public function addNote(FunctionalTester $I)
 {
     $I->am('Admin User');
     $I->wantTo('add new note to a project');
     $admin = $I->createUser(1, 4);
     $I->amLoggedAs($admin);
     $project = $I->createProject(1);
     $I->amOnAction('ProjectController@getNotes', ['project' => $project]);
     $I->submitForm('#new-note form', ['note_body' => 'note one']);
     $I->amOnAction('ProjectController@getNotes', ['project' => $project]);
     $I->see('note one', '//li[@id="note' . $project->notes()->first()->id . '"]');
 }
开发者ID:oliverpool,项目名称:tinyissue,代码行数:19,代码来源:CrudProjectNotesCest.php

示例8: loginSuccessfully

 public function loginSuccessfully(\FunctionalTester $I)
 {
     $I->amOnRoute('site/login');
     $I->submitForm('#login-form', ['LoginForm[username]' => 'admin', 'LoginForm[password]' => 'admin']);
     $I->see('Главное меню');
     $I->see('Система "Фрегат"');
     $I->see('Регистр глаукомных пациентов');
     $I->see('Настройки портала');
     $I->see('Сменить пароль');
     $I->dontSeeElement('form#login-form');
     $I->canSeeCookie('_identity');
     $I->canSeeCookie('PHPSESSID');
     $this->cookie_identity = $I->grabCookie('_identity');
     $this->cookie_session = $I->grabCookie('PHPSESSID');
 }
开发者ID:vovancho,项目名称:yii2test,代码行数:15,代码来源:LoginCest.php

示例9: updateTag

 /**
  * @param FunctionalTester $I
  *
  * @actor FunctionalTester
  *
  * @return void
  */
 public function updateTag(FunctionalTester $I)
 {
     $I->am('Admin User');
     $I->wantTo('edit an existing tag');
     $tag = (new Tag())->where('group', '=', false)->get()->random(1);
     $data = ['name' => 'tag updated'];
     $tagName = $tag->name;
     $I->amLoggedAs($I->createUser(1, 4));
     $I->amOnAction('Administration\\TagsController@getIndex');
     $I->click($this->_editTagSelector($tagName));
     $I->seeCurrentActionIs('Administration\\TagsController@getEdit', ['tag' => $tag]);
     $I->submitForm('form', $data);
     $I->amOnAction('Administration\\TagsController@getIndex');
     $I->see($data['name'], $this->_editTagSelector($data['name']));
     $I->dontSee($data['name'], $this->_editTagSelector($tagName));
 }
开发者ID:oliverpool,项目名称:tinyissue,代码行数:23,代码来源:CrudTagCest.php

示例10: FunctionalTester

<?php

use Laracasts\TestDummy\Factory;
$I = new FunctionalTester($scenario);
$I->am('talent4startups member');
$I->wantTo('login to my talent4startups account');
$user = Factory::create('App\\Models\\User', ['password' => 'password']);
$I->amOnPage('/');
$I->click('#login-link');
$I->canSeeCurrentUrlEquals('/auth/login');
$I->submitForm('form', ['email' => $user->email, 'password' => '']);
$I->dontSeeAuthentication();
$I->submitForm('form', ['email' => $user->email, 'password' => 'wrong_password']);
$I->dontSeeAuthentication();
$I->submitForm('form', ['email' => $user->email, 'password' => 'password']);
$I->amLoggedAs($user);
开发者ID:katzumi,项目名称:talent4startups,代码行数:16,代码来源:SigninCept.php

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

示例12: deactivate_slide

 public function deactivate_slide(FunctionalTester $I)
 {
     $I->am('Admin');
     $I->wantTo('deactivate a slide');
     $I->expectTo('see that the user has been deactivated');
     /***************************************************************************************************************
      * settings
      **************************************************************************************************************/
     // we create the admin role
     $admin_role = $this->_createAdminRole();
     // we attach it to the logged user
     $admin_role->users()->attach($this->_user);
     // we create a slide
     $this->_createSlide();
     /***************************************************************************************************************
      * run test
      **************************************************************************************************************/
     $I->amOnPage('/');
     $I->amOnRoute('home.edit');
     $I->uncheckOption('#activate_' . $this->_slide->id);
     $I->submitForm('#form_activate_' . $this->_slide->id, []);
     $I->seeResponseCodeIs(200);
     //        $I->see(strip_tags(trans('home.message.slide.activation.success.label', ['action' => trans_choice('users.message.activation.success.action', false), 'slide' => $this->_slide->title])));
     $I->seeRecord('slides', ['id' => $this->_slide->id, 'active' => false]);
 }
开发者ID:Okipa,项目名称:una.app,代码行数:25,代码来源:HomeCest.php

示例13: FunctionalTester

<?php

$I = new FunctionalTester($scenario);
$I->wantTo('Add a product to cart that has low stock');
$product = $I->createModel(DanPowell\Shop\Models\Product::class, [], 'inStock', 1);
$I->amOnRoute('shop.product.show', $product->slug);
$I->submitForm('#addToCart', ['quantity' => 15]);
$I->dontSee('Product added to cart');
$I->see('not enough product stock');
$I->seeFormHasErrors();
开发者ID:dan-powell,项目名称:shop,代码行数:10,代码来源:AddCartLowStockCept.php

示例14: FunctionalTester

<?php

$I = new FunctionalTester($scenario);
$I->am('Registered LAZ User');
$I->wantTo('Post a new News Post on my timeline');
$I->amLoggedAs(['email' => 'email@email.com', 'password' => 'password']);
$I->seeAuthentication();
$I->amOnPage('/home');
$I->submitForm('#prevent', ['UserPosting' => 'JonDoe', 'UserPostingID' => '100', 'BaseComment' => 'We love big baconator from wendys'], 'Post');
$I->see('Posted Successfully');
开发者ID:Core-Tech-Labs,项目名称:LAZ,代码行数:10,代码来源:PostNewsFeedCept.php

示例15: signup

 /**
  * Sign up for a new user account with the given details.
  * @param \AcceptanceTester|\FunctionalTester $I
  * @param string                              $fields
  */
 public static function signup($I, $fields)
 {
     $I->submitForm('#signup-form', ['SignupForm[email]' => $fields['email'], 'SignupForm[password]' => $fields['password'], 'SignupForm[forename]' => $fields['forename'], 'SignupForm[surname]' => $fields['surname']]);
 }
开发者ID:rhamlet1,项目名称:Hazid,代码行数:9,代码来源:SignupPage.php


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