/** * Retrieve credit card expire years * * @return array */ public function getCcYears() { $years = $this->getData('cc_years'); if ($years === null) { $years = $this->_paymentConfig->getYears(); $years = [0 => __('Year')] + $years; $this->setData('cc_years', $years); } return $years; }
/** * Retrieve credit card expire years * * @return array */ public function getCcYears() { $years = $this->getData('cc_years'); if (is_null($years)) { $years = $this->_paymentConfig->getYears(); $years = array(0 => __('Year')) + $years; $this->setData('cc_years', $years); } return $years; }
public function testGetYears() { $this->date->expects($this->once())->method('date')->with('Y')->will($this->returnValue(self::CURRENT_YEAR)); $this->assertEquals($this->_getPreparedYearsList(), $this->config->getYears()); }
/** * Retrieve credit card expire years * * @return array */ public function getCcYears() { return $this->config->getYears(); }