You are here

public function PayPalPaymentIPNControllerTest::testPID in PayPal for Payment 7

Tests PID().

@depends testInvoiceID

File

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

Class

PayPalPaymentIPNControllerTest
Tests PayPalPaymentIPNController functionality.

Code

public function testPID() {
  $pid = 3;
  $valid_invoice_id = PayPalPaymentIPNController::invoiceID(3);
  $this
    ->assertIdentical(PayPalPaymentIPNController::PID($valid_invoice_id), $pid);
  $invalid_invoice_id = 'foo';
  $this
    ->assertFalse(PayPalPaymentIPNController::PID($invalid_invoice_id));
}