/** * Set up the paypal helper. */ public function _construct() { parent::_construct(); $app = Mage::app(); $locale = $app->getLocale(); $this->_coreHelper = $this->helper('core'); $this->_paymentHelper = Mage::helper('payment'); $this->_helper = Mage::helper('ebayenterprise_paypal'); $this->_config = $this->_helper->getConfigModel(); $this->_localeCode = $locale->getLocaleCode(); $url = $this->_config->shortcutExpressCheckoutButton ?: self::DEFAULT_IMAGE_URL; $this->_payPalImageUrl = str_replace(array('{locale_code}'), array($this->_localeCode), $url); $this->_htmlId = $this->_coreHelper->uniqHash(self::HTML_ID_PREFIX); }
public function testUniqHash() { $hashOne = $this->_helper->uniqHash(); $hashTwo = $this->_helper->uniqHash(); $this->assertTrue(is_string($hashOne)); $this->assertTrue(is_string($hashTwo)); $this->assertNotEquals($hashOne, $hashTwo); }