Skip to content
Snippets Groups Projects
Commit 03b261ea authored by okarpenko's avatar okarpenko
Browse files

MAGETWO-35583: Magento\Payment\Test\Unit\Block\Info\CcTest::testGetCcExpDate failed

parent a6e17ed8
Branches
No related merge requests found
......@@ -78,7 +78,11 @@ 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->format('d'));
$date->setDate(
$this->getInfo()->getCcExpYear(),
$this->getInfo()->getCcExpMonth(),
$date->modify('first day of')->format('d')
);
return $date;
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment