You are here

function payment_test_default_line_items in Payment 7

Return two default payment line items.

Return value

array

2 calls to payment_test_default_line_items()
PaymentTestPaymentLineItemFormElementWebTestCase::testDefaultValues in tests/payment_test/tests/PaymentTestPaymentLineItemFormElementWebTestCase.test
Test default value handling.
payment_test_form_payment_line_item in tests/payment_test/payment_test.module
Implements form build callback: show a payment_line_item element.

File

tests/payment_test/payment_test.module, line 124
Hook implementations and shared functions.

Code

function payment_test_default_line_items() {
  return array(
    new PaymentLineItem(array(
      'amount' => 1.1,
      'quantity' => 1,
      'tax_rate' => 0.1,
      'description' => 'description_1',
      'name' => 'name_1',
    )),
    new PaymentLineItem(array(
      'amount' => 2.2,
      'quantity' => 2,
      'tax_rate' => 0.2,
      'description' => 'description_2',
      'name' => 'name_2',
    )),
  );
}