[ Index ]

PHP Cross Reference of DokuWiki




/_test/core/ -> TestResponse.php (summary)

(no description)

File Size: 114 lines (3 kb)
Included or required: 1 time
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

TestResponse:: (7 methods):

Class: TestResponse  - X-Ref

holds a copy of all produced outputs of a TestRequest

__construct($content, $headers, $data = array()   X-Ref

param: $content string the response body
param: $headers array the headers sent in the response
param: array $data any optional data passed back to the test system

getContent()   X-Ref
Returns the response body

return: string

getHeaders()   X-Ref
Returns the headers set in the response

return: array

getHeader($name)   X-Ref
Return a single header

param: $name   string, the name of the header without the ':', e.g. 'Content-Type', 'Pragma'
return: mixed   if exactly one header, the header (string); otherwise an array of headers, empty when no headers

getStatusCode()   X-Ref
Access the http status code

in the test environment, only status codes explicitly set by dokuwiki are likely to be returned
this means succcessful status codes (e.g. 200 OK) will not be present, but error codes will be

return: int  http status code

queryHTML($selector)   X-Ref
Query the response for a JQuery compatible CSS selector

param: $selector string
link: https://code.google.com/p/phpquery/wiki/Selectors
return: phpQueryObject

getData($key)   X-Ref
Returns all collected data for the given key

param: string $key
return: array