Пример #1
0
 /**
  * @return void
  */
 public function testExecute()
 {
     $this->abstractBlockMock
         ->expects($this->once())
         ->method('getCsvFile')
         ->willReturn(['export']);
     $this->layoutMock
         ->expects($this->once())
         ->method('getChildBlock')
         ->with('adminhtml.report.grid', 'grid.export');
     $this->fileFactoryMock
         ->expects($this->once())
         ->method('create')
         ->with('customers_orders.csv', ['export'], \Magento\Framework\App\Filesystem\DirectoryList::VAR_DIR);
     $this->exportOrdersCsv->executeInternal();
 }
Пример #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);
     }
 }