You are here

public function PayPalPaymentIPNControllerTest::testConvertStatus in PayPal for Payment 7

Tests convertStatus().

File

paypal_payment_ipn/tests/PayPalPaymentIPNControllerTest.test, line 192
Contains \PayPalPaymentIPNControllerTest.

Class

PayPalPaymentIPNControllerTest
Tests PayPalPaymentIPNController functionality.

Code

public function testConvertStatus() {
  $ipn_variables = $this
    ->mockIPNVariables(9);
  $this
    ->assertEqual(PayPalPaymentIPNController::convertStatus($ipn_variables), PAYMENT_STATUS_SUCCESS);
  $ipn_variables['payment_status'] = 'Pending';
  $ipn_variables['pending_reason'] = 'multi-currency';
  $this
    ->assertEqual(PayPalPaymentIPNController::convertStatus($ipn_variables), PAYPAL_PAYMENT_STATUS_MULTI_CURRENCY);
}