Phue\Test\Transport\HttpTest::stubMockAdapterResponseMethods PHP Method

stubMockAdapterResponseMethods() protected method

Stub adapter response methods
protected stubMockAdapterResponseMethods ( string $response, string $httpStatusCode, string $contentType )
$response string Response body
$httpStatusCode string Http status code
$contentType string Content type
    protected function stubMockAdapterResponseMethods($response, $httpStatusCode, $contentType)
    {
        // Stub send method on transport adapter
        $this->mockAdapter->expects($this->once())->method('send')->will($this->returnValue(json_encode($response)));
        // Stub getHttpStatusCode on transport adapter
        $this->mockAdapter->expects($this->once())->method('getHttpStatusCode')->will($this->returnValue($httpStatusCode));
        // Stub getContentType on transport adapter
        $this->mockAdapter->expects($this->once())->method('getContentType')->will($this->returnValue($contentType));
    }