public function testGetDefaultRedirect() { $expectedResult = '/index'; $this->redirect->expects($this->once())->method('setRefererOrBaseUrl')->willReturn('/index'); $result = $this->action->getDefaultResult(); $this->assertSame($expectedResult, $result); }
/** * @param Context $context */ public function __construct(Context $context) { parent::__construct($context->getRequest(), $context->getResponse()); $this->_objectManager = $context->getObjectManager(); $this->_eventManager = $context->getEventManager(); $this->_url = $context->getUrl(); $this->_actionFlag = $context->getActionFlag(); $this->_redirect = $context->getRedirect(); $this->_view = $context->getView(); $this->messageManager = $context->getMessageManager(); }
public function testGetResponse() { $this->assertEquals($this->response, $this->action->getResponse()); }