本文整理汇总了PHP中WebGuy::seeInDatabase方法的典型用法代码示例。如果您正苦于以下问题:PHP WebGuy::seeInDatabase方法的具体用法?PHP WebGuy::seeInDatabase怎么用?PHP WebGuy::seeInDatabase使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WebGuy
的用法示例。
在下文中一共展示了WebGuy::seeInDatabase方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
$I->wantTo('ensure AccountAccountController lost password works');
// check we are not logged in
$I->amOnPage('/');
$I->see('Hello guest');
// lost password with invalid username
$I->amOnPage('/account/account/lostPassword');
$I->fillField('AccountLostPassword_email_or_username', 'admin123');
$I->click('Recover Password');
$I->see('Please fix the following input errors:');
$I->see('Username does not exist.');
// lost password with invalid email
$I->amOnPage('/account/account/lostPassword');
$I->fillField('AccountLostPassword_email_or_username', 'admin123@mailinator.com');
$I->click('Recover Password');
$I->see('Please fix the following input errors:');
$I->see('Email does not exist.');
// lost password with correct username
$I->amOnPage('/account/account/lostPassword');
$I->fillField('AccountLostPassword_email_or_username', 'admin');
$I->click('Recover Password');
$I->see('Password reset instructions have been sent to admin@mailinator.com. Please check your email.');
$I->seeInDatabase('email_spool', array('template' => 'account_lost_password', 'status' => 'pending', 'model_name' => 'AccountUser', 'model_id' => 1, 'to_address' => '{"admin@mailinator.com":"admin admin"}', 'from_address' => '{"webmaster@localhost":"My Application"}'));
$I->seeInDatabase('token', array('model_name' => 'AccountLostPassword', 'model_id' => 1, 'uses_allowed' => 1, 'uses_remaining' => 1));
// lost password with correct email
$I->amOnPage('/account/account/lostPassword');
$I->fillField('AccountLostPassword_email_or_username', 'admin@mailinator.com');
$I->click('Recover Password');
$I->see('Password reset instructions have been sent to admin@mailinator.com. Please check your email.');
// check guest
$I->amOnPage('/');
$I->see('Hello guest');
示例2: array
$I->fillField('input#name', 'Some User');
$I->fillField('input#website', 'http://google.com');
$I->fillField('input#work_phone', '+308123456789');
$I->fillField('input#address1', 'Test Address 1');
$I->fillField('input#address2', 'Test Address 2 APPTMT SUITE');
$I->fillField('input#city', 'Zaporozhe');
$I->fillField('input#state', 'Test Province');
$I->fillField('input#postal_code', 'postcode 123455677');
$option = 'Net 7';
$I->selectOption("#payment_terms", $option);
$option = 'Euro';
$I->selectOption("#currency_id", $option);
$option = '500+';
$I->selectOption("#size_id", $option);
$option = 'Aerospace';
$I->selectOption("#industry_id", $option);
//----private notes
$I->fillField('#private_notes', 'Test Note Note Notes');
//-----------------------Form is Finished--
$I->click('Save');
$I->seeInCurrentUrl('/clients/');
$I->dontSeeInCurrentUrl('/users/');
$I->dontSeeInCurrentUrl('/user/');
$I->see('Details');
$I->see('Contacts');
$I->see('some.test.email@gmail.com');
$I->seeInDatabase('contacts', ['email' => 'some.test.email@gmail.com']);
$I->seeInDatabase('contacts', ['email' => 'AZXC123Q.test2009test@yandex2.com']);
$I->seeInDatabase('contacts', ['email' => 'azxc123q.test2009test@yandex2.com']);
$I->seeInDatabase('clients', array('currency_id' => 3, 'name' => 'Some User', 'address1' => 'Test Address 1', 'address2' => 'Test Address 2 APPTMT SUITE', 'city' => 'Zaporozhe', 'state' => 'Test Province', 'postal_code' => 'postcode 123455677', 'work_phone' => '+308123456789', 'private_notes' => 'Test Note Note Notes', 'payment_terms' => 7, 'industry_id' => 3, 'size_id' => 6));
//$I->seeInDatabase('clients', ['email' => 'azxc123q.test2009test@yandex2.com']);
示例3: WebGuy
<?php
$I = new WebGuy($scenario);
$I->wantTo('click invoice now');
$I->amOnPage('/');
$I->click('#startButton');
$I->seeInDatabase('users', ['id' => 1]);
$I->wantTo('create a client');
$I->click('#createClientLink');
$I->fillField('input#email', 'test@aol.com');
$I->click('#clientDoneButton');
$I->click('#saveButton');
$I->seeInDatabase('contacts', ['email' => 'test@aol.com']);
$I->seeInField('input#email', 'test@aol.com');