Example #1
0
 /**
  * Sets new skin for viewed store and returns customer back to the previous address
  */
 public function skinAction()
 {
     $skin = $this->getRequest()->get('skin');
     $backUrl = $this->_getRefererUrl();
     try {
         $this->_session->setSkin($skin);
     } catch (Mage_Core_Exception $e) {
         $this->_session->addError($e->getMessage());
     }
     $this->getResponse()->setRedirect($backUrl);
 }
Example #2
0
 /**
  * @expectedException Mage_Core_Exception
  */
 public function testSetSkinWrongValue()
 {
     $this->_model->setSkin('wrong/skin/applied');
 }
 /**
  * @magentoDataFixture Mage/DesignEditor/_files/design_editor_active.php
  */
 public function testExitAction()
 {
     $session = new Mage_DesignEditor_Model_Session();
     $this->assertTrue($session->isDesignEditorActive());
     $this->dispatch('backend/admin/system_design_editor/exit');
     $this->assertFalse($session->isDesignEditorActive());
     $this->assertContains('<script type="text/javascript">window.close();</script>', $this->getResponse()->getBody());
 }