本文整理汇总了PHP中AcceptanceTester::seeInDatabase方法的典型用法代码示例。如果您正苦于以下问题:PHP AcceptanceTester::seeInDatabase方法的具体用法?PHP AcceptanceTester::seeInDatabase怎么用?PHP AcceptanceTester::seeInDatabase使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AcceptanceTester
的用法示例。
在下文中一共展示了AcceptanceTester::seeInDatabase方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: updateInvoiceDesign
public function updateInvoiceDesign(AcceptanceTester $I)
{
$I->wantTo('Design my invoice');
$I->amOnPage('/settings/invoice_design');
$I->click('select#invoice_design_id');
$I->click('select#invoice_design_id option:nth-child(2)');
$I->fillField('#font_size', 10);
$I->click('#primary_color + .sp-replacer');
$I->executeJS('$("#primary_color").val("#7364b6")');
$I->executeJS('$(".sp-container:nth-child(1) .sp-choose").click()');
$I->click('#secondary_color + .sp-replacer');
$I->executeJS('$("#secondary_color").val("#aa6709")');
$I->executeJS('$(".sp-container:nth-child(2) .sp-choose").click()');
/*
$I->fillField(['name' => 'labels_item'], $this->faker->text(6));
$I->fillField(['name' => 'labels_description'], $this->faker->text(12));
$I->fillField(['name' => 'labels_unit_cost'], $this->faker->text(12));
$I->fillField(['name' => 'labels_quantity'], $this->faker->text(8));
$I->uncheckOption('#hide_quantity');
$I->checkOption('#hide_paid_to_date');
*/
$I->click('Save');
$I->wait(3);
$I->seeInDatabase('accounts', ['font_size' => 10]);
}
示例2: i_can_edit_the_users_email
public function i_can_edit_the_users_email(\AcceptanceTester $I)
{
$I->clickNode('#attribute3-node');
$I->fillField('text', 'testemail@lbm.co');
$I->click('button.dvs-sidebar-save-group');
$I->wait(self::WAIT_TIME);
$I->seeInDatabase('users', array('email' => 'testemail@lbm.co'));
}
示例3: it_register_a_valide_user
public function it_register_a_valide_user(AcceptanceTester $I)
{
$name = 'a';
$email = 'a@a.a';
$I->register(compact('name', 'email'));
$I->dontSee('username');
$I->seeInDatabase('users', ['username' => $name, 'email' => $email]);
}
示例4: editTask
public function editTask(AcceptanceTester $I)
{
$description = $this->faker->text(100);
$I->wantTo('edit a task');
$I->amOnPage('/tasks/1/edit');
$I->seeCurrentUrlEquals('/tasks/1/edit');
$I->fillField('#description', $description);
$I->click('Save');
$I->seeInDatabase('tasks', ['description' => $description]);
}
示例5: i_can_save_this_model
public function i_can_save_this_model(\AcceptanceTester $I)
{
$value = $I->generateRandomString();
$I->clickNode('#model0-node');
$I->click('.dvs-sidebar-elements button');
$I->waitForElement('#dvs-sidebar-field-form', 5);
$I->fillField('text', $value);
$I->click('button.dvs-sidebar-save-group');
$I->wait(10);
$I->seeInDatabase('dvs_test_models', array('id' => 1, 'name' => $value));
}
示例6: editInvoice
public function editInvoice(AcceptanceTester $I)
{
$I->wantTo('edit an invoice');
$I->amOnPage('/invoices/1/edit');
//change po_number with random number
$po_number = rand(100, 300);
$I->fillField('#po_number', $po_number);
//save
$I->executeJS('submitAction()');
$I->wait(1);
//check if po_number was updated
$I->seeInDatabase('invoices', ['po_number' => $po_number]);
}
示例7: i_can_create_a_new_user
public function i_can_create_a_new_user(\AcceptanceTester $I)
{
$I->clickNode('#creatorcreator-933e76acb06dec2ba6c31ba9c058a4e9-node');
$I->click('button[data-creator-attribute-name="Name"]');
$I->waitForElement('#dvs-sidebar-field-form', self::WAIT_TIME);
$I->fillField('text', 'tester');
$I->click('a[data-breadcrumb-id="0"]');
$I->wait(1);
$I->click('button[data-creator-attribute-name="Email"]');
$I->waitForElement('#dvs-sidebar-field-form', self::WAIT_TIME);
$I->fillField('text', 'testemail@lbm.co');
$I->click('a[data-breadcrumb-id="0"]');
$I->wait(1);
$I->click('button[data-creator-attribute-name="Password"]');
$I->waitForElement('#dvs-sidebar-field-form', self::WAIT_TIME);
$I->fillField('text', 'password');
$I->click('button.dvs-sidebar-save-group');
$I->wait(self::WAIT_TIME);
$I->seeInDatabase('users', array('email' => 'testemail@lbm.co'));
}
示例8: editInvoice
public function editInvoice(AcceptanceTester $I)
{
$I->wantTo('edit an invoice');
// Check all language files
$count = $I->grabNumRecords('date_formats');
for ($i = 1; $i <= $count; $i++) {
$format = $I->grabFromDatabase('date_formats', 'format', ['id' => $i]);
$date = mktime(0, 0, 0, 12, 31, date('Y'));
$value = date($format, $date);
$I->amOnPage('/settings/localization');
$I->selectOption('date_format_id', $value);
$I->click('Save');
//change po_number with random number
$I->amOnPage('/invoices/1/edit');
$po_number = rand(100, 300);
$I->fillField('#po_number', $po_number);
//save
$I->executeJS('submitAction()');
$I->wait(1);
//check if po_number was updated
$I->seeInDatabase('invoices', ['po_number' => $po_number, 'invoice_date' => date('Y-m-d')]);
}
}
示例9:
//--------------------------------------------------------------------
// Error without info
//--------------------------------------------------------------------
$I->expect('the form is not submitted');
$I->seeElement('#submit');
$I->submitForm('form', [], '#submit');
$I->seeElement('.alert-danger');
//--------------------------------------------------------------------
// Error without bad password
//--------------------------------------------------------------------
$I->expect('error returned due to bad password');
$I->seeElement('#submit');
$I->submitForm('#login_form', ['email' => 'tester@example.com', 'password' => 'badstuff'], '#submit');
$I->seeElement('.alert-danger');
$I->expect('login attempt was logged');
$I->seeInDatabase('auth_login_attempts', ['email' => 'tester@example.com']);
//--------------------------------------------------------------------
// Error without bad email
//--------------------------------------------------------------------
$I->expect('error returned due to bad email');
$I->seeElement('#submit');
$I->submitForm('#login_form', ['email' => 'testy@examples.com', 'password' => 'mylittlepony'], '#submit');
$I->seeElement('.alert-danger');
$I->expect('login attempt was logged');
$I->seeInDatabase('auth_login_attempts', ['email' => 'testy@examples.com']);
//--------------------------------------------------------------------
// Successfully login
//--------------------------------------------------------------------
$I->expect('am logged in');
$I->seeElement('#submit');
$I->submitForm('#login_form', ['email' => 'tester@example.com', 'password' => 'mylittlepony'], '#submit');
示例10: AcceptanceTester
<?php
$I = new AcceptanceTester($scenario);
$I->wantTo('add a new user and see it in database');
$I->amOnPage('/login');
$I->click('Sign Up With Email');
$I->fillField('firstname', 'Phanbook');
$I->fillField('email', 'phanbook@phanbook.com');
$I->fillField('username', 'phannook');
$I->click('Sign in');
$I->seeInDatabase('users', ['email' => 'phanbook@phanbook.com', 'username' => 'phannook', 'firstname' => 'Phanbook']);
示例11: AcceptanceTester
<?php
$I = new AcceptanceTester($scenario);
$I->wantTo('add a new user and see it in database');
$I->amOnPage('/oauth/login');
$I->see('Sign In');
$I->submitForm('#login-form', ['email' => 'Davert@gmail.com', 'password' => '123456', 'remember' => true], 'Sign In');
$I->amOnPage('/oauth/register/signup');
$I->fillField('firstname', 'Phanbook');
$I->fillField('email', 'hello@phanbook.com');
$I->fillField('username', 'admin');
$I->click('Sign in');
$I->seeInDatabase('users', ['email' => 'hello@phanbook.com', 'username' => 'admin']);
示例12: AcceptanceTester
<?php
$I = new AcceptanceTester($scenario);
$I->wantTo('sign in');
$I->amOnPage('user/login');
$I->fillField('email', 'admin@gmail.com');
$I->fillField('password', 'adminn');
$I->click('Login', '.btn-primary');
$I->amOnPage('/');
$I->see('admin');
$I->seeInDatabase('users', ['email' => 'admin@gmail.com']);
$I->amOnPage('user/profile');
$I->see('Birthday');
$I->click('Create a new post');
$I->see('Title');
$I->seeInCurrentUrl('post/create');
$I->click('Create a new post', '.btn-primary');
$I->see('The title field is required.');
$I->see('The content field is required.');
示例13: AcceptanceTester
<?php
$I = new AcceptanceTester($scenario);
$I->wantTo('see the Home page');
$I->amOnPage('/');
$I->see('My albums');
$I->seeInDatabase('album', array('artist' => 'Adele', 'title' => '21'));
$I->seeLink('Add new album');
$I->click('Add new album');
$I->see('Title');
$I->see('Artist');
$I->seeCurrentUrlEquals('/album/add');
$I->fillField('title', 'foo');
$I->fillField('artist', 'bar');
// enable repopulate and cleanup in codeception.yml to reset the db before each test
// enabld module Db in acceptance.suite.yml to use this feature
// click submit to add the new album
//$I->dontSee('foo');
//$I->click('submit');
//$I->see('foo');
示例14: AcceptanceTester
<?php
$I = new AcceptanceTester($scenario);
$I->wantTo('add a new user and see it in the database');
$I->amOnPage('/');
$I->fillField('email', 'sokada@gmail.com');
$I->click('Add User');
$I->seeInDatabase('users', ['email' => 'sokada@gmail.com']);
$I->see('sokada@gmail.com', 'li');
示例15: AcceptanceTester
<?php
$I = new AcceptanceTester($scenario);
$I->wantTo('check users info in datebase');
$I->seeInDatabase('user', array('mail' => 'test@test'));