/** * SetUp: before executing each test function * * @author Florian Preusner * @version 2.1 * @since 2015-06 */ public function setUp() { $this->response = $this->getMockBuilder('GuzzleHttp\\Psr7\\Response')->disableOriginalConstructor()->getMock(); $bodyMock = $this->getMockBuilder('GuzzleHttp\\Psr7\\Stream')->disableOriginalConstructor()->getMock(); $bodyMock->method('__toString')->willReturn('test body'); $this->response->method('getStatusCode')->willReturn(200); $this->response->method('getHeaders')->willReturn($this->headers); $this->response->method('getBody')->willReturn($bodyMock); $this->response->method('getProtocolVersion')->willReturn('1.1'); }