Exemplo n.º 1
0
 /**
  * Emulate environment of an area
  *
  * @param string $mode
  * @param string $areaCode
  * @return void
  */
 protected function _emulateArea($mode, $areaCode)
 {
     switch ($mode) {
         case self::MODE_NAVIGATION:
         default:
             $this->_areaEmulator->emulateLayoutArea($areaCode);
             break;
     }
 }
Exemplo n.º 2
0
 public function testUpdateNavigationMode()
 {
     $this->_setAdditionalExpectations();
     $request = $this->getMock('Magento\\Framework\\App\\Request\\Http', array(), array(), '', false);
     $request->expects($this->once())->method('getPathInfo')->will($this->returnValue('/'));
     $this->_backendSession->expects($this->at(0))->method('setData')->with('vde_current_url', '/');
     $this->_backendSession->expects($this->at(1))->method('setData')->with('vde_current_mode', \Magento\DesignEditor\Model\State::MODE_NAVIGATION);
     $this->_urlModelFactory->expects($this->once())->method('replaceClassName')->with(self::URL_MODEL_NAVIGATION_MODE_CLASS_NAME);
     $this->_areaEmulator->expects($this->once())->method('emulateLayoutArea')->with(self::AREA_CODE);
     $controller = $this->getMock('Magento\\Backend\\Controller\\Adminhtml\\Action', array(), array(), '', false);
     $this->_model->update(self::AREA_CODE, $request, $controller);
 }
Exemplo n.º 3
0
 public function testEmulateLayoutArea()
 {
     $configuration = ['Magento\\Framework\\View\\Layout' => ['arguments' => ['area' => 'test_area']]];
     $this->_objectManager->expects($this->once())->method('configure')->with($configuration);
     $this->_model->emulateLayoutArea('test_area');
 }