Ejemplo n.º 1
0
 /**
  * @return void
  */
 public function testCreateActionRegistrationEnabled()
 {
     $this->customerSession->expects($this->once())->method('isLoggedIn')->will($this->returnValue(false));
     $this->registrationMock->expects($this->once())->method('isAllowed')->will($this->returnValue(true));
     $this->redirectMock->expects($this->never())->method('redirect');
     $this->pageFactoryMock->expects($this->once())->method('create')->willReturn($this->resultPageMock);
     $this->object->execute();
 }
Ejemplo n.º 2
0
 /**
  * {@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);
     }
 }
Ejemplo n.º 3
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);
     }
 }
Ejemplo n.º 4
0
 /**
  * @return void
  */
 public function testCreateActionRegistrationEnabled()
 {
     $this->customerSession->expects($this->once())->method('isLoggedIn')->will($this->returnValue(false));
     $this->registrationMock->expects($this->once())->method('isAllowed')->will($this->returnValue(true));
     $this->redirectMock->expects($this->never())->method('redirect');
     $layoutMock = $this->getMock('Magento\\Framework\\View\\Layout', [], [], '', false);
     $layoutMock->expects($this->once())->method('initMessages')->willReturnSelf();
     $this->pageFactoryMock->expects($this->once())->method('create')->willReturn($this->resultPageMock);
     $this->resultPageMock->expects($this->once())->method('getLayout')->will($this->returnValue($layoutMock));
     $this->object->execute();
 }
Ejemplo n.º 5
0
 /**
  * @return void
  */
 public function testCreateActionRegistrationEnabled()
 {
     $this->customerSession->expects($this->once())->method('isLoggedIn')->will($this->returnValue(false));
     $this->customerHelperMock->expects($this->once())->method('isRegistrationAllowed')->will($this->returnValue(true));
     $this->redirectMock->expects($this->never())->method('redirect');
     $layoutMock = $this->getMock('Magento\\Framework\\View\\Layout', array(), array(), '', false);
     $layoutMock->expects($this->once())->method('initMessages')->will($this->returnSelf());
     $this->viewMock->expects($this->once())->method('loadLayout')->will($this->returnSelf());
     $this->viewMock->expects($this->once())->method('getLayout')->will($this->returnValue($layoutMock));
     $this->viewMock->expects($this->once())->method('renderLayout')->will($this->returnSelf());
     $this->object->execute();
 }