Ejemplo n.º 1
0
 public function testUpdateNavigationMode()
 {
     $this->_setAdditionalExpectations();
     $request = $this->getMock('Magento\\Framework\\App\\Request\\Http', [], [], '', 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\\App\\Action', [], [], '', false);
     $this->_model->update(self::AREA_CODE, $request, $controller);
 }
Ejemplo n.º 2
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');
 }