Ejemplo n.º 1
0
 public function testExportVarnishConfigAction()
 {
     $fileContent = 'some conetnt';
     $filename = 'varnish.vcl';
     $responseMock = $this->getMockBuilder('Magento\\Framework\\App\\ResponseInterface')->disableOriginalConstructor()->getMock();
     $this->configMock->expects($this->once())->method('getVclFile')->will($this->returnValue($fileContent));
     $this->fileFactoryMock->expects($this->once())->method('create')->with($this->equalTo($filename), $this->equalTo($fileContent), $this->equalTo(DirectoryList::VAR_DIR))->will($this->returnValue($responseMock));
     $result = $this->action->executeInternal();
     $this->assertInstanceOf('Magento\\Framework\\App\\ResponseInterface', $result);
 }
Ejemplo n.º 2
0
 /**
  * {@inheritdoc}
  */
 public function dispatch(\Magento\Framework\App\RequestInterface $request)
 {
     $pluginInfo = $this->pluginList->getNext($this->subjectType, 'dispatch');
     if (!$pluginInfo) {
         return parent::dispatch($request);
     } else {
         return $this->___callPlugins('dispatch', func_get_args(), $pluginInfo);
     }
 }