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


PHP FunctionalTester::seeFormErrorMessage方法代码示例

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


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

示例1: testDuplicateEmail

 public function testDuplicateEmail(FunctionalTester $I)
 {
     $I->haveRecord('users', ['email' => $this->tester['email']]);
     $I->fillField('email', $this->tester['email']);
     $I->click('Register', 'button');
     $I->seeFormErrorMessage('email', 'already been taken');
 }
开发者ID:stellargames,项目名称:StellarDestiny,代码行数:7,代码来源:RegistrationCest.php

示例2: FunctionalTester

<?php

$I = new FunctionalTester($scenario);
$I->wantTo('create a currency without data');
$I->am('a Administrator user');
$I->dontSeeAuthentication();
$I->amLoggedAs(['email' => 'admin@admin.com', 'password' => 'admin']);
$I->seeAuthentication();
//When
$I->amOnPage('/settings/currency');
//And
$I->see('Create');
$I->click('Create');
//Then
$I->seeCurrentUrlEquals('/settings/currency/create');
//When
$form = ['name' => '', 'symbol' => ''];
//And
$I->submitForm('//form', $form, 'Create');
//Then
$I->seeFormErrorMessage('name', 'The name field is required.');
//
开发者ID:raulbravo23,项目名称:salepoint,代码行数:22,代码来源:CreateCurrencyWithOutDataCept.php

示例3: FunctionalTester

<?php

$I = new FunctionalTester($scenario);
$I->wantTo('attempt to remind my password');
$I->haveRecord('users', ['name' => 'Joe Doe', 'email' => 'joe@doe.com', 'password' => bcrypt('123'), 'created_at' => new DateTime(), 'updated_at' => new DateTime(), 'is_confirm' => 0]);
$I->amOnPage('/Password');
$I->fillField('email', 'joe@doe.com');
$I->click('button[type=submit]');
$I->seeFormErrorMessage('email', 'Konto o tym adresie e-mail nie istnieje lub e-mail nie został potwierdzony');
开发者ID:furious-programming,项目名称:coyote,代码行数:9,代码来源:PasswordFormErrorCept.php

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

示例5: 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
//And
$I->click('Save');
$I->seeFormErrorMessage('name', 'The name field is required.');
$I->seeFormErrorMessage('email', 'The E-Mail Address field is required.');
$I->seeFormErrorMessage('password', 'The Password field is required.');
开发者ID:raulbravo23,项目名称:salepoint,代码行数:19,代码来源:CreateUserWithoutDataCept.php

示例6: bcrypt

$I->fillField('password', 'pass');
$I->fillField('password_confirmation', 'pass');
$I->click('button[type=submit]');
$I->seeFormHasErrors();
$I->seeCurrentUrlEquals('/register');
$I->seeFormErrorMessages(array('email' => 'The email must be a valid email address.', 'name' => 'The name must be at least 3 characters.', 'password' => 'The password must be at least 8 characters.'));
$I->dontSeeRecord('users', ['email' => 'example']);
$I->expectTo('register a user with a mismatching password');
$I->fillField('name', 'Johndoe');
$I->fillField('email', 'example@example.com');
$I->fillField('password', 'passee');
$I->fillField('password_confirmation', 'pass');
$I->click('button[type=submit]');
$I->seeFormHasErrors();
$I->seeCurrentUrlEquals('/register');
$I->seeFormErrorMessage('password', 'The password confirmation does not match.');
$I->dontSeeRecord('users', ['email' => 'example@example.com']);
$I->expectTo('register a user with existing username and email');
$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->fillField('name', 'andelabendozy');
$I->fillField('email', 'andela@andela.com');
$I->fillField('password', 'password');
$I->fillField('password_confirmation', 'password');
$I->click('button[type=submit]');
$I->seeFormErrorMessages(array('email' => 'The email has already been taken.', 'name' => 'The name has already been taken.'));
$I->expectTo('register a user with the correct details');
$I->fillField('name', 'andela');
$I->fillField('email', 'andelatest@andela.com');
$I->fillField('password', 'password');
$I->fillField('password_confirmation', 'password');
$I->click('button[type=submit]');
开发者ID:andela,项目名称:chopbox,代码行数:31,代码来源:RegisterCept.php

示例7: 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' => 'admin@admin.com', 'password' => '123456', 'password_confirmation' => '123456'];
//and
$I->submitForm('//form', $form, 'Save');
//then
$I->seeFormErrorMessage('email', 'The E-Mail Address has already been taken.');
开发者ID:raulbravo23,项目名称:salepoint,代码行数:19,代码来源:CreateUserUniqueEmailCept.php

示例8: FunctionalTester

<?php

$I = new FunctionalTester($scenario);
$I->wantTo('test form error assertions');
$I->amOnPage('/');
$I->click('Utwórz konto', '.btn-register');
$I->seeCurrentUrlEquals('/Register');
$I->click('button[type=submit]');
$I->seeFormHasErrors();
$I->seeFormErrorMessages(array('name' => 'Pole nazwa użytkownika jest wymagane.', 'email' => 'Pole email jest wymagane.', 'password' => 'Pole hasło jest wymagane.'));
$I->fillField('name', '^%&%%$^$');
$I->fillField('email', 'johndoe@example.com');
$I->fillField('password', 'password');
$I->fillField('password_confirmation', 'password');
$I->click('button[type=submit]');
$I->seeFormErrorMessage('name', 'Nazwa użytkownika może zawierać litery, cyfry oraz znaki ._ -');
开发者ID:furious-programming,项目名称:coyote,代码行数:16,代码来源:RegisterErrorCept.php

示例9: FunctionalTester

<?php

$I = new FunctionalTester($scenario);
$I->wantTo('login as a user');
$I->haveRecord('users', ['email' => 'john@doe.com', 'username' => 'johndoe', 'password' => bcrypt('password'), 'created_at' => new DateTime(), 'updated_at' => new DateTime(), 'status' => TRUE, 'profile_state' => FALSE]);
$I->amOnPage('/login');
$I->fillField('email', 'john@doe.c');
$I->fillField('password', 'password');
$I->click('button[type=submit]');
$I->seeFormHasErrors();
$I->seeFormErrorMessage(null, 'These credentials do not match our records.');
$I->dontSeeAuthentication();
$I->amOnPage('/login');
$I->fillField('email', 'john@doe.com');
$I->fillField('password', 'password');
$I->click('button[type=submit]');
$I->amOnPage('/');
$I->seeAuthentication();
$I->logout();
开发者ID:andela,项目名称:chopbox,代码行数:19,代码来源:LoginCept.php


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