From 3b710bd27359815a0de582cbb20c794e234b0616 Mon Sep 17 00:00:00 2001 From: okarpenko <okarpenko@ebay.com> Date: Mon, 30 Mar 2015 15:01:07 +0300 Subject: [PATCH] MAGETWO-35583: Magento\Payment\Test\Unit\Block\Info\CcTest::testGetCcExpDate failed --- app/code/Magento/Payment/Block/Info/Cc.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/app/code/Magento/Payment/Block/Info/Cc.php b/app/code/Magento/Payment/Block/Info/Cc.php index 6da308168f0..afc1d2ebd29 100644 --- a/app/code/Magento/Payment/Block/Info/Cc.php +++ b/app/code/Magento/Payment/Block/Info/Cc.php @@ -78,11 +78,7 @@ class Cc extends \Magento\Payment\Block\Info public function getCcExpDate() { $date = new \DateTime('now', new \DateTimeZone($this->_localeDate->getConfigTimezone())); - $date->setDate( - $this->getInfo()->getCcExpYear(), - $this->getInfo()->getCcExpMonth(), - $date->modify('first day of')->format('d') - ); + $date->setDate($this->getInfo()->getCcExpYear(), $this->getInfo()->getCcExpMonth() + 1, 0); return $date; } -- GitLab