public function PayPalPaymentIPNControllerTest::testLoad in PayPal for Payment 7
Tests load().
@depends testSave
File
- paypal_payment_ipn/
tests/ PayPalPaymentIPNControllerTest.test, line 55 - Contains \PayPalPaymentIPNControllerTest.
Class
- PayPalPaymentIPNControllerTest
- Tests PayPalPaymentIPNController functionality.
Code
public function testLoad() {
$ipn = new PayPalPaymentIPN(array(
'psiid' => 42,
));
PayPalPaymentIPNController::save($ipn);
$ipn_loaded = PayPalPaymentIPNController::load($ipn->psiid);
$this
->assertTrue($ipn_loaded instanceof PayPalPaymentIPN, 'An IPN is loaded correctly.');
$non_existing_ipn_loaded = PayPalPaymentIPNController::load(999);
$this
->assertFalse($non_existing_ipn_loaded, 'A non-existing IPN is not loaded.');
}