Response
class Response (View source)
Methods
Check if the content is json format
Check if the content is json format and the parsed data is some to the content
Check if the content is some of parse data
Check if the header exists
Check if the content is array format
Check the content type
Check if the content type is application/json
Check if the content type is text/plain
Check if the content type is text/html
Check if the content type is text/xml
Check the status code
No description
No description
Check if the content contains the parsed text
Get the response content
__call
Details
__construct(Parser $parser)
Behovior constructor.
Behavior
assertJson(string $message = '')
Check if the content is json format
Behavior
assertExactJson($data, string $message = '')
Check if the content is json format and the parsed data is some to the content
Behavior
assertContainsExactText(string $data, string $message = '')
Check if the content is some of parse data
Behavior
assertHeader(string $header, string $message = '')
Check if the header exists
Behavior
assertArray(string $message = '')
Check if the content is array format
Behavior
assertContentType($content_type, string $message = '')
Check the content type
Behavior
assertContentTypeJson(string $message = '')
Check if the content type is application/json
Behavior
assertContentTypeText(string $message = '')
Check if the content type is text/plain
Behavior
assertContentTypeHtml(string $message = '')
Check if the content type is text/html
Behavior
assertContentTypeXml(string $message = '')
Check if the content type is text/xml
Behavior
assertStatus(int $code, string $message = '')
Check the status code
Behavior
assertKeyExists($key, string $message = '')
No description
Behavior
assertKeyMatchValue($key, $value, string $message = '')
No description
Behavior
assertContains(string $text)
Check if the content contains the parsed text
string
getContent()
Get the response content
mixed
__call(string $method, array $params = [])
__call