Ejemplo n.º 1
0
 public function testExecuteWithException()
 {
     $this->scopeConfigInterface->expects($this->once())->method('getValue')->will($this->returnValue(true));
     $dataProvider = $this->getMock('Magento\\Framework\\App\\Rss\\DataProviderInterface');
     $dataProvider->expects($this->once())->method('isAllowed')->will($this->returnValue(true));
     $rssModel = $this->getMock('Magento\\Rss\\Model\\Rss', ['setDataProvider'], [], '', false);
     $rssModel->expects($this->once())->method('setDataProvider')->will($this->returnSelf());
     $this->response->expects($this->once())->method('setHeader')->will($this->returnSelf());
     $this->rssFactory->expects($this->once())->method('create')->will($this->returnValue($rssModel));
     $this->rssManager->expects($this->once())->method('getProvider')->will($this->returnValue($dataProvider));
     $this->setExpectedException('\\Zend_Feed_Builder_Exception');
     $this->controller->execute();
 }
Ejemplo n.º 2
0
 /**
  * @return void
  */
 public function execute()
 {
     $this->getRequest()->setParam('type', 'articles');
     parent::execute();
 }