function UcAddressesCartCheckoutTestCase::checkout in Ubercart Addresses 7
Same name and namespace in other branches
- 6.2 tests/uc_addresses.checkout.test \UcAddressesCartCheckoutTestCase::checkout()
Override of UbercartTestHelper::checkout().
Return value
object An Ubercart order object, if checkout succeeded. False otherwise.
Overrides UbercartTestHelper::checkout
1 call to UcAddressesCartCheckoutTestCase::checkout()
- UcAddressesCartCheckoutTestCase::testDoubleAddresses in tests/
uc_addresses.checkout.test - Test if double addresses are not saved when checking out.
File
- tests/
uc_addresses.checkout.test, line 50 - Test cases for checkout.
Class
- UcAddressesCartCheckoutTestCase
- Test cases for checkout.
Code
function checkout($edit = array()) {
$this
->drupalPost('cart', array(), 'Checkout');
$edit = $this
->populateCheckoutForm($edit);
// Submit the checkout page.
$this
->drupalPost('cart/checkout', $edit, t('Review order'));
$this
->assertRaw(t('Your order is almost complete.'));
// Complete the review page.
$this
->drupalPost(NULL, array(), t('Submit order'));
// Check if an order has been created.
$conditions = array(
'delivery_first_name' => $edit['panes[delivery][address][delivery_first_name]'],
);
return $this
->checkExistingOrder($conditions);
}