示例#1
0
 public function testExecuteRandom()
 {
     $newKey = 'RSASHA9000VERYSECURESUPERMANKEY';
     $this->requestMock->expects($this->at(0))->method('getPost')->with($this->equalTo('generate_random'))->willReturn(1);
     $this->changeMock->expects($this->once())->method('changeEncryptionKey')->willReturn($newKey);
     $this->managerMock->expects($this->once())->method('addSuccessMessage');
     $this->managerMock->expects($this->once())->method('addNoticeMessage');
     $this->cacheMock->expects($this->once())->method('clean');
     $this->responseMock->expects($this->once())->method('setRedirect');
     $this->model->execute();
 }
示例#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);
     }
 }
 /**
  * {@inheritdoc}
  */
 public function getResponse()
 {
     $pluginInfo = $this->pluginList->getNext($this->subjectType, 'getResponse');
     if (!$pluginInfo) {
         return parent::getResponse();
     } else {
         return $this->___callPlugins('getResponse', func_get_args(), $pluginInfo);
     }
 }