/** * Retrieve credit card expire months * * @return array */ public function getCcMonths() { $months = $this->getData('cc_months'); if ($months === null) { $months[0] = __('Month'); $months = array_merge($months, $this->_paymentConfig->getMonths()); $this->setData('cc_months', $months); } return $months; }
public function testGetMonths() { $this->localeLists->expects($this->once())->method('getTranslationList')->with('month')->will($this->returnValue($this->monthList)); $this->assertEquals($this->expectedMonthList, $this->config->getMonths()); }
/** * Retrieve credit card expire months * * @return array */ public function getCcMonths() { return $this->config->getMonths(); }
public function testGetMonths() { $this->localeResolver->expects($this->once())->method('getLocale')->willReturn('en_US'); $this->assertEquals($this->expectedMonthList, $this->config->getMonths()); }