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


PHP FunctionalTester::fillField方法代碼示例

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


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

示例1: fill_in_form

 private function fill_in_form(FunctionalTester $I)
 {
     $I->fillField('name', self::NAME);
     $I->fillField('email', self::EMAIL);
     $I->fillField('password', self::PASSWORD);
     $I->fillField('password_confirmation', self::PASSWORD);
 }
開發者ID:neilrussell6,項目名稱:l5-task-list,代碼行數:7,代碼來源:RegisterCest.php

示例2: cantCreateDuplicateKeyEntry

 public function cantCreateDuplicateKeyEntry(FunctionalTester $I)
 {
     $I->am('an equipment team member');
     $I->wantTo('make sure I cant create duplicate entries');
     //Load and login a known member
     $I->loginEquipmentTeamMember();
     $I->amOnPage('/equipment');
     $I->canSee('Record a new item');
     $name = $this->faker->word;
     $slug = substr($this->faker->slug, 0, 10);
     //First item
     $I->click('Record a new item');
     $I->fillField('Name', $name);
     $I->fillField('Slug', $slug);
     $I->click('Save');
     $I->seeCurrentUrlEquals('/equipment/' . $slug . '/edit');
     /*
     //Second item
     $I->click('Record a new item');
     $I->fillField('Name', $name);
     $I->fillField('Key', $slug);
     
     $I->assertTrue(
         $I->seeExceptionThrown('BB\Exceptions\FormValidationException', function() use ($I){
             $I->click('Save');
         })
     );
     */
 }
開發者ID:adamstrawson,項目名稱:BBMembershipSystem,代碼行數:29,代碼來源:EquipmentCest.php

示例3: updateIssue

 /**
  * @param FunctionalTester $I
  *
  * @actor FunctionalTester
  *
  * @return void
  */
 public function updateIssue(FunctionalTester $I)
 {
     $I->am('Admin User');
     $I->wantTo('edit an existing project issue details');
     $admin = $I->createUser(1, 4);
     $developer1 = $I->createUser(2, 2);
     // developer
     $I->amLoggedAs($admin);
     $project = $I->createProject(1, [$developer1]);
     $I->amOnAction('Project\\IssueController@getNew', ['project' => $project]);
     $issue = $I->createIssue(1, $admin, $developer1, $project);
     $I->amOnAction('Project\\IssueController@getIndex', ['project' => $project, 'issue' => $issue]);
     $I->seeLink('Issue 1');
     $I->dontSee(\Html::duration($issue->time_quote), '.issue-quote');
     $I->click('Issue 1', '.edit-issue');
     $I->seeCurrentActionIs('Project\\IssueController@getEdit', ['project' => $project, 'issue' => $issue]);
     $newTitle = 'Issue 1 update';
     $newTime = 3700;
     $I->fillField('title', $newTitle);
     $I->fillField('time_quote[h]', 1);
     $I->fillField('time_quote[s]', 100);
     $I->fillField('tag', 'type:tag1');
     $I->click(trans('tinyissue.update_issue'));
     $I->seeResponseCodeIs(200);
     $I->seeCurrentActionIs('Project\\IssueController@getIndex', ['project' => $project, 'issue' => $issue]);
     $I->seeLink($newTitle);
     $I->see(\Html::duration($newTime), '.issue-quote');
     $I->see('type', '.issue-tag');
     $I->see('tag1', '.issue-tag');
 }
開發者ID:oliverpool,項目名稱:tinyissue,代碼行數:37,代碼來源:CrudIssueCest.php

示例4: checkIfLogin

 /**
  * Define custom actions here
  */
 function checkIfLogin(\FunctionalTester $I)
 {
     //if ($I->loadSessionSnapshot('login')) return;
     $I->amOnPage('/login');
     $I->fillField(['name' => 'email'], Fixtures::get('username'));
     $I->fillField(['name' => 'password'], Fixtures::get('password'));
     $I->click('#loginButton');
     //$I->saveSessionSnapshot('login');
 }
開發者ID:magicians,項目名稱:invoiceninja,代碼行數:12,代碼來源:FunctionalTester.php

示例5: loginFailsWhenPasswordIncorrect

 public function loginFailsWhenPasswordIncorrect(FunctionalTester $I)
 {
     $I->amOnPage('/auth/login');
     $I->see('Login');
     $I->fillField('email', 'wayne@chargemasterplc.com');
     $I->fillField('password', 'incorrect');
     $I->click('Login');
     $I->seeCurrentUrlEquals('/auth/login');
     $I->dontSeeAuthentication();
     $I->see('These credentials do not match our records.');
 }
開發者ID:richmartell,項目名稱:laravel,代碼行數:11,代碼來源:AuthCest.php

示例6: invalidUsernamePassword

 /**
  * @param FunctionalTester $I
  *
  * @return void
  */
 public function invalidUsernamePassword(FunctionalTester $I)
 {
     $I->wantTo('login with invalid username/password');
     $I->amOnAction('HomeController@getIndex');
     $I->dontSeeAuthentication();
     $I->see('Login');
     $I->fillField('Email', 'user@user.com');
     $I->fillField('Password', '1234');
     $I->click('Login');
     $I->dontSeeAuthentication();
 }
開發者ID:oliverpool,項目名稱:tinyissue,代碼行數:16,代碼來源:LoginCest.php

示例7: testRegisterSuccsess

 public function testRegisterSuccsess(FunctionalTester $I)
 {
     $I->wantTo('register a user');
     $I->amOnPage('/register');
     $I->fillField('name', 'JohnDoe');
     $I->fillField('email', 'johnDoe@gmail.com');
     $I->fillField('password', 'admin');
     $I->fillField('password_confirmation', 'admin');
     $I->click('Continue');
     $I->amOnPage('/');
 }
開發者ID:nguyentantintb,項目名稱:wedding-card,代碼行數:11,代碼來源:WeddingCardTestCest.php

示例8: authAsAdmin

 /**
  * @param \FunctionalTester $I
  */
 protected function authAsAdmin(\FunctionalTester $I)
 {
     $I->amOnPage(AuthorizationPage::$LOGOUT_URL);
     $I->amOnPage(AuthorizationPage::$LOGIN_URL);
     $I->fillField(AuthorizationPage::$USERNAME_FIELD, AuthorizationPage::$USERNAME);
     $I->fillField(AuthorizationPage::$PASSWORD_FIELD, AuthorizationPage::$PASSWORD);
     $I->click(AuthorizationPage::$SUBMIT_BUTTON);
     $I->expect(AuthorizationPage::$EXPECT_SUCCESS_LOGIN);
     $I->amOnPage(AuthorizationPage::$DASHBOARD_URL);
     $I->see(AuthorizationPage::$SEE_ELEMENT_ON_DASHBOARD);
 }
開發者ID:TeodorSolvic,項目名稱:Symfony2-Base-Instance,代碼行數:14,代碼來源:AdminAuthBase.php

示例9: trySigninWithInvalidCredentials

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

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

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

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

示例13: it_register_a_valide_user

 public function it_register_a_valide_user(FunctionalTester $I)
 {
     $name = 'joe';
     $email = 'joe@gmail.com';
     $password = 'secret';
     $I->amOnRoute('user:register');
     $I->fillField('username', $name);
     $I->fillField('email', $email);
     $I->fillField('password', $password);
     $I->fillField('password_confirmation', $password);
     $I->click(Lang::get('form.register'));
     //$I->seePageIs(route('home'));
     //$I->seeInDatabase('users', ['username' => $name, 'email' => $email]);
 }
開發者ID:lembarek,項目名稱:auth,代碼行數:14,代碼來源:AuthControllerCest.php

示例14: updateEmail

 /**
  * @param FunctionalTester $I
  *
  * @actor FunctionalTester
  *
  * @return void
  */
 public function updateEmail(FunctionalTester $I)
 {
     $I->am('Normal User');
     $I->wantTo('update my email');
     $I->lookForwardTo('be able to change my email');
     $user = $I->createUser(1);
     $I->amLoggedAs($user);
     $I->amOnAction('UserController@getSettings');
     $I->fillField('email', 'email');
     $I->click(trans('tinyissue.update'));
     $I->seeFormHasErrors();
     $I->fillField('email', 'email@email.com');
     $I->click(trans('tinyissue.update'));
     $I->seeInField('email', 'email@email.com');
 }
開發者ID:oliverpool,項目名稱:tinyissue,代碼行數:22,代碼來源:UserCest.php

示例15: editAProfile

 public function editAProfile(FunctionalTester $I, UserSteps $userSteps)
 {
     $userSteps->loginAsFirstUser();
     $I->click('Profile');
     $I->dontSeeInFormFields('#profileForm', ['name' => 'John Doe']);
     $I->fillField('name', 'John Doe');
     $I->click('Update');
     $I->click('Log Out');
     $I->see('Goodbye John Doe!');
 }
開發者ID:codeception,項目名稱:phalcon-demo,代碼行數:10,代碼來源:EditProfileCest.php


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