示例#1
0
 public function testApplyCustomLayoutUpdate()
 {
     $categoryId = 123;
     $pageLayout = 'page_layout';
     $this->objectManager->expects($this->any())->method('get')->will($this->returnValueMap([['Magento\\Catalog\\Helper\\Category', $this->categoryHelper]]));
     $this->request->expects($this->any())->method('getParam')->will($this->returnValueMap([[Action::PARAM_NAME_URL_ENCODED], ['id', false, $categoryId]]));
     $this->categoryRepository->expects($this->any())->method('get')->with($categoryId)->will($this->returnValue($this->category));
     $this->categoryHelper->expects($this->any())->method('canShow')->will($this->returnValue(true));
     $settings = $this->getMock('Magento\\Framework\\DataObject', ['getPageLayout'], [], '', false);
     $settings->expects($this->atLeastOnce())->method('getPageLayout')->will($this->returnValue($pageLayout));
     $this->catalogDesign->expects($this->any())->method('getDesignSettings')->will($this->returnValue($settings));
     $this->action->executeInternal();
 }