You are here

function PaymentUbercartCheckoutWebTestCase::getLastOrderID in Payment for Ubercart 7.2

Same name and namespace in other branches
  1. 7 tests/PaymentUbercartCheckoutWebTestCase.test \PaymentUbercartCheckoutWebTestCase::getLastOrderID()

Loads the order ID of the most recent order.

Return value

integer

1 call to PaymentUbercartCheckoutWebTestCase::getLastOrderID()
PaymentUbercartCheckoutWebTestCase::assertCheckout in tests/PaymentUbercartCheckoutWebTestCase.test
Executes the checkout process.

File

tests/PaymentUbercartCheckoutWebTestCase.test, line 46

Class

PaymentUbercartCheckoutWebTestCase

Code

function getLastOrderID() {
  return db_select('uc_orders')
    ->fields('uc_orders', array(
    'order_id',
  ))
    ->orderBy('order_id', 'DESC')
    ->range(0, 1)
    ->execute()
    ->fetchField();
}