Ejemplo n.º 1
0
 /**
  * @covers Mage_Core_Model_App_Emulation::startEnvironmentEmulation
  * @covers Mage_Core_Model_App_Emulation::stopEnvironmentEmulation
  */
 public function testEnvironmentEmulation()
 {
     $this->_model = Mage::getModel('Mage_Core_Model_App_Emulation');
     Mage::getDesign()->setArea(Mage_Core_Model_App_Area::AREA_ADMINHTML);
     $initialEnvInfo = $this->_model->startEnvironmentEmulation(1);
     $initialDesign = $initialEnvInfo->getInitialDesign();
     $this->assertEquals(Mage_Core_Model_App_Area::AREA_ADMINHTML, $initialDesign['area']);
     $this->assertEquals(Mage_Core_Model_App_Area::AREA_FRONTEND, Mage::getDesign()->getArea());
     $this->_model->stopEnvironmentEmulation($initialEnvInfo);
     $this->assertEquals(Mage_Core_Model_App_Area::AREA_ADMINHTML, Mage::getDesign()->getArea());
 }