You are here

public function PayPalPaymentECPaymentMethodControllerTest::testsaveAuthentication in PayPal for Payment 7

Tests saveAuthentication().

File

paypal_payment_ec/tests/PayPalPaymentECPaymentMethodControllerTest.test, line 35
Contains \PayPalPaymentECPaymentMethodControllerTest.

Class

PayPalPaymentECPaymentMethodControllerTest
Tests payment execution.

Code

public function testsaveAuthentication() {
  $controller = payment_method_controller_load('PayPalPaymentECPaymentMethodController');
  $token = new PayPalPaymentECAuthentication('foo', time(), 1);
  $controller
    ->saveAuthentication($token);
  $token_loaded = $controller
    ->loadAuthentication($token->pid);
  $this
    ->assertEqual((array) $token_loaded, (array) $token);
}