Ejemplo n.º 1
0
 /**
  * Render tag manager script
  *
  * @return string
  */
 protected function _toHtml()
 {
     if ($this->_cookieHelper->isUserNotAllowSaveCookie() || !$this->_gtmHelper->isEnabled()) {
         return '';
     }
     return parent::_toHtml();
 }
Ejemplo n.º 2
0
 public function testGetCookieRestrictionLifetime()
 {
     $storeStub = $this->_getStoreStub();
     $storeStub->expects($this->once())->method('getConfig')->will($this->returnCallback('Mage_Core_Helper_CookieTest::getConfigMethodStub'))->with($this->equalTo('web/cookie/cookie_restriction_lifetime'));
     $this->_object = new Mage_Core_Helper_Cookie(array('current_store' => $storeStub, 'cookie_model' => $this->_getCookieStub(array(1 => 1)), 'website' => $this->_getWebsiteStub()));
     $this->assertEquals($this->_object->getCookieRestrictionLifetime(), 60 * 60 * 24 * 365);
 }