function PaymentUbercartCheckoutWebTestCase::testCheckout in Payment for Ubercart 7
Same name and namespace in other branches
- 7.2 tests/PaymentUbercartCheckoutWebTestCase.test \PaymentUbercartCheckoutWebTestCase::testCheckout()
File
- tests/PaymentUbercartCheckoutWebTestCase.test, line 18
Class
- PaymentUbercartCheckoutWebTestCase
Code
function testCheckout() {
$payment_method = $this
->paymentMethodCreate(0, payment_method_controller_load('PaymentMethodBasicController'));
entity_save('payment_method', $payment_method);
$user = $this
->drupalCreateUser(array(
'create product content',
'create orders',
'view own orders',
));
$this
->drupalLogin($user);
$this
->drupalPost('node/add/product', array(
'title' => 'foo',
'model' => 'bar',
'sell_price' => '12.34',
), t('Save'));
$this
->assertCheckout(1, $payment_method->pmid);
$this
->drupalLogout();
$this
->assertCheckout(1, $payment_method->pmid);
}