Exemplo n.º 1
0
 /**
  * Replace URLs from cache
  *
  * @param string $html
  * @return string
  */
 protected function _afterCacheUrl($html)
 {
     if ($this->_cache->canUse(self::CACHE_GROUP)) {
         Mage::app()->setUseSessionVar(false);
         Magento_Profiler::start('CACHE_URL');
         $html = $this->_urlBuilder->sessionUrlVar($html);
         Magento_Profiler::stop('CACHE_URL');
     }
     return $html;
 }
Exemplo n.º 2
0
 /**
  * Note: isolation flushes the URL memory cache
  * @magentoAppIsolation enabled
  *
  * Note: to enforce SID in URLs, base URL must be different from the current $_SERVER['HTTP_HOST']
  * @magentoConfigFixture current_store web/unsecure/base_link_url http://domain.com/
  */
 public function testSessionUrlVar()
 {
     $sessionId = Mage::getSingleton('Mage_Core_Model_Session')->getEncryptedSessionId();
     $this->assertEquals('<a href="http://example.com/?SID=' . $sessionId . '">www.example.com</a>', $this->_model->sessionUrlVar('<a href="http://example.com/?___SID=U">www.example.com</a>'));
 }
Exemplo n.º 3
0
 public function testSessionUrlVar()
 {
     $this->assertEquals('<a href="http://example.com/?SID=' . session_id() . '">www.example.com</a>', $this->_model->sessionUrlVar('<a href="http://example.com/?___SID=U">www.example.com</a>'));
 }