You are here

public function UbercartCreditCardTestCase::brokentestCheckout in Ubercart 6.2

Tests that an order can be placed using the test gateway.

File

payment/uc_credit/uc_credit.test, line 289
Credit card payment method tests.

Class

UbercartCreditCardTestCase
Tests the credit card payments with the test gateway.

Code

public function brokentestCheckout() {
  $this
    ->drupalPost('node/' . $this->product->nid, array(), t('Add to cart'));
  $this
    ->checkout(array(
    'cc_number' => array_rand(array_flip(self::$test_cards)),
    'cc_cvv' => mt_rand(100, 999),
    'cc_exp_month' => mt_rand(1, 12),
    'cc_exp_year' => mt_rand(2012, 2022),
  ));
  $this
    ->assertText('Your order is complete!');
}