silverstripe-framework/src/Dev/TestSession_STResponseWrapper.php

87 lines
1.4 KiB
PHP
Raw Permalink Normal View History

<?php
namespace SilverStripe\Dev;
2016-09-09 08:43:05 +02:00
use SilverStripe\Control\HTTPResponse;
/**
2016-09-09 08:43:05 +02:00
* Wrapper around HTTPResponse to make it look like a SimpleHTTPResposne
* @deprecated 4.13.0 Will be removed without equivalent functionality to replace it
*/
class TestSession_STResponseWrapper
{
2016-11-29 00:31:16 +01:00
/**
* @var HTTPResponse
*/
private $response;
2016-11-29 00:31:16 +01:00
public function __construct(HTTPResponse $response)
{
Deprecation::withNoReplacement(function () {
Deprecation::notice(
'4.13.0',
'Will be removed without equivalent functionality to replace it',
Deprecation::SCOPE_CLASS
);
});
2016-11-29 00:31:16 +01:00
$this->response = $response;
}
2016-11-29 00:31:16 +01:00
/**
* @return string
*/
public function getContent()
{
return $this->response->getBody();
}
2016-11-29 00:31:16 +01:00
/**
* @return string
*/
public function getError()
{
return "";
}
2016-11-29 00:31:16 +01:00
/**
* @return null
*/
public function getSent()
{
return null;
}
2016-11-29 00:31:16 +01:00
/**
* @return string
*/
public function getHeaders()
{
return "";
}
2016-11-29 00:31:16 +01:00
/**
* @return string 'GET'
*/
public function getMethod()
{
return "GET";
}
2016-11-29 00:31:16 +01:00
/**
* @return string
*/
public function getUrl()
{
return "";
}
2016-11-29 00:31:16 +01:00
/**
* @return null
*/
public function getRequestData()
{
return null;
}
}