You are here

function PaymentTestPaymentStatusItemWebTestCase::testPaymentStatusItem in Payment 7

Test payment status item handling.

File

tests/payment_test/tests/PaymentTestPaymentStatusItemWebTestCase.test, line 31
Contains class PaymentTestPaymentStatusItemWebTestCase.

Class

PaymentTestPaymentStatusItemWebTestCase
Test payment status item handling.

Code

function testPaymentStatusItem() {
  $payment = new Payment();
  $status_pending = new PaymentStatusItem(PAYMENT_STATUS_PENDING);
  $status_success = new PaymentStatusItem(PAYMENT_STATUS_SUCCESS);
  $payment
    ->setStatus($status_pending);
  $payment
    ->setStatus($status_success);
  $this
    ->assertTrue($payment
    ->getStatus() === $status_success, 'Payment::setStatus() sets status items in the right order and Payment::getStatus() retrieves them.');
}