class Response (View source)

Methods

__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

Details

__construct(Parser $parser)

Behovior constructor.

Parameters

Parser $parser

Behavior assertJson(string $message = '')

Check if the content is json format

Parameters

string $message

Return Value

Behavior

Behavior assertExactJson($data, string $message = '')

Check if the content is json format and the parsed data is some to the content

Parameters

$data
string $message

Return Value

Behavior

Behavior assertContainsExactText(string $data, string $message = '')

Check if the content is some of parse data

Parameters

string $data
string $message

Return Value

Behavior

Behavior assertHeader(string $header, string $message = '')

Check if the header exists

Parameters

string $header
string $message

Return Value

Behavior

Behavior assertArray(string $message = '')

Check if the content is array format

Parameters

string $message

Return Value

Behavior

Behavior assertContentType($content_type, string $message = '')

Check the content type

Parameters

$content_type
string $message

Return Value

Behavior

Behavior assertContentTypeJson(string $message = '')

Check if the content type is application/json

Parameters

string $message

Return Value

Behavior

Behavior assertContentTypeText(string $message = '')

Check if the content type is text/plain

Parameters

string $message

Return Value

Behavior

Behavior assertContentTypeHtml(string $message = '')

Check if the content type is text/html

Parameters

string $message

Return Value

Behavior

Behavior assertContentTypeXml(string $message = '')

Check if the content type is text/xml

Parameters

string $message

Return Value

Behavior

Behavior assertStatus(int $code, string $message = '')

Check the status code

Parameters

int $code
string $message

Return Value

Behavior

Behavior assertKeyExists($key, string $message = '')

No description

Parameters

$key
string $message

Return Value

Behavior

Behavior assertKeyMatchValue($key, $value, string $message = '')

No description

Parameters

$key
$value
string $message

Return Value

Behavior

Behavior assertContains(string $text)

Check if the content contains the parsed text

Parameters

string $text

Return Value

Behavior

string getContent()

Get the response content

Return Value

string

mixed __call(string $method, array $params = [])

__call

Parameters

string $method
array $params

Return Value

mixed