14 $this->_escaper->expects($this->once())->method(
'escapeHtml')->willReturnArgument(0);
16 $this->_requestMock->expects($this->any())
21 \
Magento\Integration\Controller\Adminhtml\Integration::PARAM_INTEGRATION_ID,
25 [\
Magento\Integration\Controller\Adminhtml\Integration::PARAM_REAUTHORIZE, 0, 1],
29 $this->_integrationSvcMock->expects($this->once())
31 ->with($this->equalTo(self::INTEGRATION_ID))
34 $this->_oauthSvcMock->expects($this->once())->method(
'deleteIntegrationToken');
35 $this->_oauthSvcMock->expects($this->once())->method(
'postToConsumer');
36 $consumerMock = $this->createMock(\
Magento\Integration\Model\Oauth\Consumer::class);
37 $consumerMock->expects($this->once())->method(
'getId')->willReturn(1);
38 $this->_oauthSvcMock->expects($this->once())->method(
'loadConsumer')->willReturn($consumerMock);
40 $this->_messageManager->expects($this->once())->method(
'addNotice');
41 $this->_messageManager->expects($this->never())->method(
'addError');
42 $this->_messageManager->expects($this->never())->method(
'addSuccess');
44 $this->_viewMock->expects($this->once())->method(
'loadLayout');
45 $this->_viewMock->expects($this->once())->method(
'renderLayout');
47 $this->_responseMock->expects($this->once())->method(
'getBody');
48 $this->_responseMock->expects($this->once())->method(
'representJson');
_getIntegrationModelMock()
testTokensExchangeReauthorize()
_createIntegrationController($actionName)