mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
8dd644d25d
Namespace all templates Move difflib and BBCodeParser2 to thirdparty Remove deprecated API marked for removal in 4.0
79 lines
933 B
PHP
79 lines
933 B
PHP
<?php
|
|
|
|
namespace SilverStripe\Dev;
|
|
|
|
use SilverStripe\Control\SS_HTTPResponse;
|
|
|
|
/**
|
|
* Wrapper around SS_HTTPResponse to make it look like a SimpleHTTPResposne
|
|
*/
|
|
class TestSession_STResponseWrapper
|
|
{
|
|
|
|
/**
|
|
* @var SS_HTTPResponse
|
|
*/
|
|
private $response;
|
|
|
|
public function __construct(SS_HTTPResponse $response)
|
|
{
|
|
$this->response = $response;
|
|
}
|
|
|
|
/**
|
|
* @return string
|
|
*/
|
|
public function getContent()
|
|
{
|
|
return $this->response->getBody();
|
|
}
|
|
|
|
/**
|
|
* @return string
|
|
*/
|
|
public function getError()
|
|
{
|
|
return "";
|
|
}
|
|
|
|
/**
|
|
* @return null
|
|
*/
|
|
public function getSent()
|
|
{
|
|
return null;
|
|
}
|
|
|
|
/**
|
|
* @return string
|
|
*/
|
|
public function getHeaders()
|
|
{
|
|
return "";
|
|
}
|
|
|
|
/**
|
|
* @return string 'GET'
|
|
*/
|
|
public function getMethod()
|
|
{
|
|
return "GET";
|
|
}
|
|
|
|
/**
|
|
* @return string
|
|
*/
|
|
public function getUrl()
|
|
{
|
|
return "";
|
|
}
|
|
|
|
/**
|
|
* @return null
|
|
*/
|
|
public function getRequestData()
|
|
{
|
|
return null;
|
|
}
|
|
}
|