Esempio n. 1
0
 /**
  * Note: isolation flushes the URL memory cache
  * @magentoAppIsolation enabled
  * @magentoConfigFixture current_store web/secure/base_url        http://sample.com/base_path/
  * @magentoConfigFixture current_store web/secure/base_link_url   https://sample.com/base_link_path/
  * @magentoConfigFixture current_store web/secure/use_in_frontend 1
  */
 public function testGetBaseUrlConfigured()
 {
     $actualUrl = $this->_model->getBaseUrl(array('_type' => Mage_Core_Model_Store::URL_TYPE_WEB));
     $this->assertEquals('http://sample.com/base_path/', $actualUrl);
     $actualUrl = $this->_model->getBaseUrl(array('_type' => Mage_Core_Model_Store::URL_TYPE_LINK));
     $this->assertEquals('https://sample.com/base_link_path/index.php/', $actualUrl);
     $actualUrl = $this->_model->getBaseUrl(array('_type' => Mage_Core_Model_Store::URL_TYPE_LINK, '_secure' => 1));
     $this->assertEquals('https://sample.com/base_link_path/index.php/', $actualUrl);
 }
Esempio n. 2
0
 /**
  * Note: isolation flushes the URL memory cache
  * @magentoAppIsolation enabled
  *
  * @dataProvider getBaseUrlConfiguredDataProvider
  *
  * @magentoConfigFixture current_store web/secure/base_url        http://sample.com/base_path/
  * @magentoConfigFixture current_store web/unsecure/base_link_url http://sample.com/base_link_path/
  * @magentoConfigFixture current_store web/secure/base_link_url   https://sample.com/base_link_path/
  * @magentoConfigFixture current_store web/secure/use_in_frontend 1
  *
  * @param array $params
  * @param string $expectedUrl
  */
 public function testGetBaseUrlConfigured($params, $expectedUrl)
 {
     $actualUrl = $this->_model->getBaseUrl($params);
     $this->assertEquals($expectedUrl, $actualUrl);
 }