You are here

public function CommercePaymentCreditCardTest::testCalculateExpirationTimestamp in Commerce Core 7

@covers ::calculateExpirationTimestamp

File

modules/payment/tests/commerce_payment_credit_card.test, line 94
Unit tests for credit card detection.

Class

CommercePaymentCreditCardTest
Tests credit card detection.

Code

public function testCalculateExpirationTimestamp() {
  $timestamp = CommercePaymentCreditCard::calculateExpirationTimestamp(12, 2012);
  $date = date('Y-m-d H:i:s', $timestamp);
  $expected_date = date('2012-12-31 00:00:00');
  $this
    ->assertEqual($expected_date, $date);
}