예제 #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 execute()
 {
     $pluginInfo = $this->pluginList->getNext($this->subjectType, 'execute');
     if (!$pluginInfo) {
         return parent::execute();
     } else {
         return $this->___callPlugins('execute', func_get_args(), $pluginInfo);
     }
 }