/** * IF request is not POST */ public function testProcessNoPost() { $this->requestMock->expects($this->once())->method('isPost')->will($this->returnValue(false)); $this->messageManagerMock->expects($this->never())->method('getMessages'); $this->assertInstanceOf('\\Magento\\Framework\\App\\ResponseInterface', $this->msgBox->afterDispatch($this->objectMock, $this->responseMock)); }