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


PHP FunctionalTester::selectOption方法代码示例

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


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

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

示例2: submit

 /**
  * Submit the project create/update form.
  * @param \AcceptanceTester|\FunctionalTester $I
  * @param array                               $fields
  */
 public static function submit($I, $fields)
 {
     if ($fields['image']) {
         $I->attachFile('#uploadform-newimage', $fields['image']);
     }
     $I->fillField(['name' => 'Project[name]'], $fields['name']);
     $I->selectOption(['name' => 'Project[coordinator]'], $fields['coordinator']);
     $I->fillField(['name' => 'Project[status]'], $fields['status']);
     $I->fillField(['name' => 'UploadForm[newImageDescription][]'], $fields['imageDescription']);
     $I->click('#project-form button');
 }
开发者ID:rhamlet1,项目名称:Hazid,代码行数:16,代码来源:FormPageFragment.php

示例3: teamMemberCanEditLog

 public function teamMemberCanEditLog(FunctionalTester $I)
 {
     $I->am('a laser team member');
     $I->wantTo('make sure I can edit laser logs');
     //Load and login a known admin member
     $user = $I->loginLaserTeamMember();
     $otherUser = User::find(1);
     $I->amOnPage('/equipment/laser');
     $I->see($otherUser->name);
     $I->selectOption('form[name=equipmentLog] select[name=reason]', 'testing');
     $I->click('Update');
 }
开发者ID:adamstrawson,项目名称:BBMembershipSystem,代码行数:12,代码来源:EquipmentLogCest.php

示例4: updateProject

 /**
  * @param FunctionalTester $I
  *
  * @actor FunctionalTester
  *
  * @return void
  */
 public function updateProject(FunctionalTester $I)
 {
     $I->am('Admin User');
     $I->wantTo('edit an existing project details');
     $project = $I->createProject(1);
     $admin = $I->createUser(1, 4);
     $I->amLoggedAs($admin);
     $I->amOnAction('ProjectController@getEdit', ['project' => $project]);
     $I->selectOption('status', Project::STATUS_ARCHIVED);
     $I->click(trans('tinyissue.update'));
     $I->seeCurrentActionIs('ProjectsController@getIndex');
     $I->dontSeeLink('Project 1');
     $I->amOnAction('ProjectsController@getIndex', ['status' => Project::STATUS_ARCHIVED]);
     $I->seeLink('Project 1');
 }
开发者ID:oliverpool,项目名称:tinyissue,代码行数:22,代码来源:CrudProjectCest.php

示例5: updateFirstLastName

 /**
  * @param FunctionalTester $I
  *
  * @actor FunctionalTester
  *
  * @return void
  */
 public function updateFirstLastName(FunctionalTester $I)
 {
     $I->am('Normal User');
     $I->wantTo('update my name');
     $I->lookForwardTo('be able to change my name');
     $user = $I->createUser(1);
     $I->amLoggedAs($user);
     $I->amOnAction('UserController@getSettings');
     $I->fillField('firstname', 'First');
     $I->fillField('lastname', 'Last');
     $I->selectOption('language', 'en');
     $I->click(trans('tinyissue.update'));
     $I->seeInField('firstname', 'First');
     $I->seeInField('lastname', 'Last');
     $I->seeLink('First', '/user/settings');
 }
开发者ID:oliverpool,项目名称:tinyissue,代码行数:23,代码来源:UserCest.php

示例6: addUser

 /**
  * @param FunctionalTester $I
  *
  * @actor FunctionalTester
  *
  * @return void
  */
 public function addUser(FunctionalTester $I)
 {
     $I->am('Admin User');
     $I->wantTo('add new user');
     $admin = $I->createUser(1, 4);
     $I->amLoggedAs($admin);
     $I->amOnAction('Administration\\UsersController@getAdd');
     $I->fillField('firstname', 'user1');
     $I->fillField('lastname', 'lastname1');
     $I->fillField('email', 'email');
     $I->selectOption('role_id', 2);
     $I->click(trans('tinyissue.add_user'));
     $I->seeFormHasErrors();
     $I->fillField('email', 'user1@email.com');
     $I->click(trans('tinyissue.add_user'));
     $user = $I->fetchUserBy('email', 'user1@email.com');
     $I->see($user->fullname);
     $I->seeCurrentActionIs('Administration\\UsersController@getIndex');
 }
开发者ID:oliverpool,项目名称:tinyissue,代码行数:26,代码来源:CrudUserCest.php

示例7: memberCanViewVoteOnActiveProposal

 public function memberCanViewVoteOnActiveProposal(FunctionalTester $I)
 {
     $I->am('a member');
     $I->wantTo('make sure I can view and vote on a proposal');
     //Create a proposal that's currently open
     $startDate = Carbon::now()->subDay()->format('Y-m-d');
     $endDate = Carbon::now()->addDays(2)->format('Y-m-d');
     $I->haveInDatabase('proposals', ['id' => 2, 'title' => 'Proposal 2', 'description' => 'Demo Description', 'user_id' => '1', 'start_date' => $startDate, 'end_date' => $endDate]);
     //Load and login a known member
     $user = User::find(1);
     Auth::login($user);
     //I can see the menu item
     $I->amOnPage('/proposals');
     $I->canSee('Proposals');
     //Goto the proposal page
     $I->click('Proposal 2');
     $I->canSee('Proposal 2');
     $I->canSee('Voting is Open');
     //Select the +1 vote option
     $I->selectOption('[name=vote]', '+1');
     $I->click('Vote');
     $I->canSeeInDatabase('proposal_votes', ['proposal_id' => 2, 'user_id' => $user->id, 'vote' => '+1']);
 }
开发者ID:adamstrawson,项目名称:BBMembershipSystem,代码行数:23,代码来源:ProposalsCest.php

示例8:

$I->seeCurrentUrlEquals('/catalog/43up/input');
$I->seeFormErrorMessages(array('name1' => '姓は必須入力項目です。必ず入力してください。', 'name2' => '名は必須入力項目です。必ず入力してください。', 'kana1' => 'セイは必須入力項目です。必ず入力してください。', 'kana2' => 'メイは必須入力項目です。必ず入力してください。', 'sex' => '性別は必須入力項目です。必ず入力してください。', 'tel1' => 'TELは必須入力項目です。必ず入力してください。', 'post1' => '郵便番号は必須入力項目です。必ず入力してください。', 'area' => '都道府県は必須入力項目です。必ず入力してください。', 'address1' => '市町村区・町名は必須入力項目です。必ず入力してください。', 'address2' => '地名・番地・建物名は必須入力項目です。必ず入力してください。', 'email1' => 'E-mailは必須入力項目です。必ず入力してください。', 'age' => '年齢は必須入力項目です。必ず入力してください。', 'job' => 'ご職業は必須入力項目です。必ず入力してください。'));
//check max length
$I->fillField('name1', INPUT_LENGTH_50 . '𪚲');
//length 51
$I->fillField('name2', INPUT_LENGTH_50 . '𪚲');
//length 51
$I->fillField('kana1', INPUT_LENGTH_50 . '𪚲');
//length 51
$I->fillField('kana2', INPUT_LENGTH_50 . '𪚲');
//length 51
$I->fillField('tel1', '12456-545-4564');
//length 14
$I->fillField('post1', '98765-432-4321');
//length 14
$I->selectOption('area', '青森県');
$I->fillField('address1', INPUT_LENGTH_50 . '𪚲');
//length 51
$I->fillField('address2', INPUT_LENGTH_50 . '𪚲');
//length 51
$I->fillField('email1', INPUT_LENGTH_99 . '.vn');
//length 102
//submit_button form
$I->click('STEP3 入力情報の確認へ進む');
//check required
$I->seeCurrentUrlEquals('/catalog/43up/input');
$I->seeFormErrorMessages(array('name1' => '姓は50文字以下で入力してください。', 'name2' => '名は50文字以下で入力してください。', 'kana1' => 'セイは50文字以下で入力してください。', 'kana2' => 'メイは50文字以下で入力してください。', 'tel1' => 'TELは11文字以上、13文字以下で入力してください。', 'address1' => '市町村区・町名は50文字以下で入力してください。', 'address2' => '地名・番地・建物名は50文字以下で入力してください。', 'email1' => 'E-mailは100文字以下で入力してください。'));
//
//
//-----------------------------------check email can be apply-----------------------------------
//
开发者ID:vodanh624321,项目名称:laravel5,代码行数:31,代码来源:ValidateForInputCatalogR3Cept.php

示例9: update_role_with_data_changes

 public function update_role_with_data_changes(FunctionalTester $I)
 {
     $I->am('Admin');
     $I->wantTo('update a role with no data');
     $I->expectTo('see an error message explaining that the fields are required');
     /***************************************************************************************************************
      * settings
      **************************************************************************************************************/
     // we create the admin role
     $admin = $this->_createAdminRole();
     // we attach it to the logged user
     $admin->users()->attach($this->_user);
     // we create another role
     $operator = $this->_createUserRole();
     /***************************************************************************************************************
      * run test
      **************************************************************************************************************/
     $I->amOnPage('/');
     $I->amOnRoute('permissions.edit', ['id' => $operator->id]);
     $I->fillField('name_fr', 'Test FR');
     $I->fillField('slug', 'new_slug');
     $I->selectOption('parent_role_id', $admin->id);
     $I->checkOption('#settings' . config('permissions.separator') . 'view');
     $I->checkOption('#permissions');
     $I->checkOption('#permissions' . config('permissions.separator') . 'list');
     $I->checkOption('#permissions' . config('permissions.separator') . 'create');
     $I->checkOption('#permissions' . config('permissions.separator') . 'view');
     $I->checkOption('#permissions' . config('permissions.separator') . 'update');
     $I->checkOption('#permissions' . config('permissions.separator') . 'delete');
     $I->checkOption('#users');
     $I->checkOption('#users' . config('permissions.separator') . 'list');
     $I->checkOption('#users' . config('permissions.separator') . 'create');
     $I->checkOption('#users' . config('permissions.separator') . 'view');
     $I->checkOption('#users' . config('permissions.separator') . 'update');
     $I->checkOption('#users' . config('permissions.separator') . 'delete');
     $I->click(trans('permissions.page.action.edit'));
     $I->seeCurrentRouteIs('permissions.edit', ['id' => $operator->id]);
     $I->see(trans('global.modal.alert.title.success'), 'h3');
     $I->see(strip_tags(trans('permissions.message.update.success', ['name' => 'Test FR'])));
     $I->seeInField('name_fr', 'Test FR');
     $I->seeInField('slug', 'new-slug');
     $I->seeInField('position', 2);
     $I->seeOptionIsSelected('#input_parent_role', '1 - ' . $admin->name);
     $I->seeCheckboxIsChecked('#settings' . config('permissions.separator') . 'view');
     $I->seeCheckboxIsChecked('#permissions');
     $I->seeCheckboxIsChecked('#permissions' . config('permissions.separator') . 'list');
     $I->seeCheckboxIsChecked('#permissions' . config('permissions.separator') . 'create');
     $I->seeCheckboxIsChecked('#permissions' . config('permissions.separator') . 'view');
     $I->seeCheckboxIsChecked('#permissions' . config('permissions.separator') . 'update');
     $I->seeCheckboxIsChecked('#permissions' . config('permissions.separator') . 'delete');
     $I->seeCheckboxIsChecked('#users');
     $I->seeCheckboxIsChecked('#users' . config('permissions.separator') . 'list');
     $I->seeCheckboxIsChecked('#users' . config('permissions.separator') . 'create');
     $I->seeCheckboxIsChecked('#users' . config('permissions.separator') . 'view');
     $I->seeCheckboxIsChecked('#users' . config('permissions.separator') . 'update');
     $I->seeCheckboxIsChecked('#users' . config('permissions.separator') . 'delete');
     $I->seeRecord('roles', ['id' => $operator->id, 'slug' => 'new-slug', 'position' => 2, 'permissions' => '{"permissions":true,"users":true,"settings.view":true,"permissions.list":true,"permissions.create":true,"permissions.view":true,"permissions.update":true,"permissions.delete":true,"users.list":true,"users.create":true,"users.view":true,"users.update":true,"users.delete":true}']);
 }
开发者ID:Okipa,项目名称:una.app,代码行数:58,代码来源:PermissionCest.php

示例10:

$I->see('E-mail');
$I->see('TEL');
$I->see('性別');
$I->see('男');
$I->see('女');
$I->see('年齢');
$I->see('ご職業');
$I->see('FAX');
//fill value
$I->fillField('ext53', '全角4000文字以内');
$I->fillField('name1', '積水');
$I->fillField('name2', '太郎');
$I->fillField('kana1', 'セキスイ');
$I->fillField('kana2', 'タロウ');
$I->fillField('post1', '060-0000');
$I->selectOption('form select[name=area]', '山形県');
$I->fillField('address1', '東京都港区虎ノ門');
$I->fillField('address2', '2-3-17虎ノ門2丁目タワー');
$I->fillField('email1', 'email1@gmail.com');
$I->fillField('tel1', '01-1234-5678');
$I->selectOption('sex', '男');
$I->selectOption('age', '21~25歳');
$I->selectOption('job', '公務員');
$I->fillField('fax1', '1234-123-1234');
//submit form
$I->click('入力内容確認へ進む');
//
//
//
//
//-------------------------------inquiry confirm page-------------------------------
开发者ID:vodanh624321,项目名称:laravel5,代码行数:31,代码来源:ApplyInquireCept.php

示例11:

$I->seeCurrentUrlEquals('/admin/sections/create');
$I->see('New section', 'h1');
$I->amGoingTo('Omit the name field in order to submit an invalid form');
// When
$I->fillField('Slug URL', 'our-company');
$I->click('Create section');
// Then
$I->expectTo('See the form again with the errors');
$I->seeCurrentUrlEquals('/admin/sections/create');
$I->seeInField('slug_url', 'our-company');
$I->see('The name field is required', '.error');
$I->amGoingTo('Fill a valid form');
// When
$I->fillField('Name', 'Our company');
$I->fillField('Slug URL', 'our-company');
$I->selectOption('type', 'blog');
$I->selectOption('menu', 1);
$I->fillField('menu_order', 2);
$I->selectOption('published', 0);
// And
$I->click('Create section');
// Then
$I->seeCurrentUrlEquals('/admin/sections/1');
$I->see('Our company', 'h1');
/*
$I->seeRecord('sections', [
    'name' => 'Our company',
    'menu_order' => 2,
    'menu' => 1,
    'published' => 0
]);
开发者ID:heroseven,项目名称:cms,代码行数:31,代码来源:CreateSectionCept.php

示例12: FunctionalTester

<?php

$I = new FunctionalTester($scenario);
$I->amOnPage('/extensions-manager/extensions/search');
$I->seeResponseCodeIs(200);
$I->canSeeElement('[name="query"]');
$I->fillField(['name' => 'query'], 'devgroup/');
$I->selectOption('select[name=type]', 'dotplant-extension');
$I->click('form button[type="submit"]');
$I->canSeeElement('[data-action="ext-info"]');
// rbac
$I->amOnPage('/extensions-manager/extensions/search?guest');
$I->cantSeeElement('[name="query"]');
开发者ID:DevGroup-ru,项目名称:yii2-extensions-manager,代码行数:13,代码来源:ExtensionsSearchCept.php

示例13: FunctionalTester

$I = new FunctionalTester($scenario);
$I->am('a CMS admin');
$I->wantTo('filter the section list');
// When
$I->haveSection();
// Created "Our company" section
$sections = $I->haveSections();
// Random sections
// And
$I->amOnPage('admin/sections');
// Then
$I->seeElement('input', ['name' => 'search']);
// When
$I->fillField('search', 'company');
$I->selectOption('published', '1');
// And
$I->click('Filter sections');
// Then
$I->seeCurrentUrlEquals('/admin/sections?search=company&published=1&menu=');
$I->expect('not to see the our company record');
// Then
$I->see('There are no sections, please create the first one');
$I->dontSee('Our company', 'td.name');
$I->seeInField('search', 'company');
// When
$I->selectOption('published', '0');
$I->selectOption('menu', '0');
// And
$I->click('Filter sections');
// Then
开发者ID:heroseven,项目名称:cms,代码行数:30,代码来源:FilterSectionsCept.php

示例14: update_slide_with_data_changed

 public function update_slide_with_data_changed(FunctionalTester $I)
 {
     $I->am('Admin');
     $I->wantTo('update slide data');
     $I->expectTo('see a success confirmation message and see that the user data has changed');
     /***************************************************************************************************************
      * 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();
     // we create another slide
     $slide = $this->_slide_repo->create(['title' => 'Aviron universitaire', 'quote' => 'Other quote', 'picto' => 'picto_2.png', 'background_image' => 'bg_img_2.jpg', 'position' => 2, 'active' => true]);
     /***************************************************************************************************************
      * run test
      **************************************************************************************************************/
     $I->amOnPage('/');
     $I->amOnRoute('slides.edit', ['id' => $this->_slide->id]);
     $I->fillField('title', 'Test');
     $I->fillField('quote', 'Rejoignez le plus grand club d\'aviron universitaire de France. Nous proposons des tarifs avantageux pour tous les étudiants nantais !');
     $I->selectOption('#input_previous_slide_id', $slide->position . ' - ' . $slide->title);
     $I->checkOption('#input_active');
     $I->click(trans('home.page.action.slide.update'));
     $I->seeCurrentRouteIs('slides.edit', ['id' => $this->_slide->id]);
     $I->see(trans('global.modal.alert.title.success'), 'h3');
     $I->see(strip_tags(trans('home.message.slide.update.success', ['slide' => 'Test'])));
     $I->seeInField('title', 'Test');
     $I->seeInField('quote', 'Rejoignez le plus grand club d\'aviron universitaire de France. Nous proposons des tarifs avantageux pour tous les étudiants nantais !');
     $I->seeOptionIsSelected('#input_previous_slide_id', '1 - ' . $slide->title);
     $I->seeCheckboxIsChecked('#input_active');
     $I->seeRecord('slides', ['title' => 'Test', 'quote' => 'Rejoignez le plus grand club d\'aviron universitaire de France. Nous proposons des tarifs avantageux pour tous les étudiants nantais !', 'position' => 2, 'active' => true]);
 }
开发者ID:Okipa,项目名称:una.app,代码行数:35,代码来源:HomeCest.php

示例15: FunctionalTester

<?php

$I = new FunctionalTester($scenario);
$I->wantTo('Register with Share-A-Meal');
$I->amOnPage('/');
$I->click('Don\'t have an account?');
$I->seeCurrentUrlEquals('/register');
$I->fillField('email', 'akhimantrip@gmail.com');
$I->fillField('password', '12345');
$I->selectOption('gender', 'male');
$I->click('Register');
$I->seeCurrentUrlEquals('/verify');
开发者ID:neostoic,项目名称:sharemeal,代码行数:12,代码来源:RegisterCept.php


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