classe Response (Voir la source)

Méthodes

__construct(Parser $parser)

Behovior constructor.

assertJson(string $message = '')

Check if the content is json format

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

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

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

Check if the content is some of parse data

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

Check if the header exists

assertArray(string $message = '')

Check if the content is array format

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

Check the content type

assertContentTypeJson(string $message = '')

Check if the content type is application/json

assertContentTypeText(string $message = '')

Check if the content type is text/plain

assertContentTypeHtml(string $message = '')

Check if the content type is text/html

assertContentTypeXml(string $message = '')

Check if the content type is text/xml

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

Check the status code

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

Pas de description

assertKeyMatchValue(string|int $key, mixed $value, string $message = '')

Pas de description

assertContains(string $text)

Check if the content contains the parsed text

string
getContent()

Get the response content

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

__call

Détails

__construct(Parser $parser)

Behovior constructor.

Paramètres

Parser $parser

Response assertJson(string $message = '')

Check if the content is json format

Paramètres

string $message

Valeur de retour

Response

Response assertExactJson(array $data, string $message = '')

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

Paramètres

array $data
string $message

Valeur de retour

Response

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

Check if the content is some of parse data

Paramètres

string $data
string $message

Valeur de retour

Response

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

Check if the header exists

Paramètres

string $header
string $message

Valeur de retour

Response

Response assertArray(string $message = '')

Check if the content is array format

Paramètres

string $message

Valeur de retour

Response

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

Check the content type

Paramètres

string $content_type
string $message

Valeur de retour

Response

Response assertContentTypeJson(string $message = '')

Check if the content type is application/json

Paramètres

string $message

Valeur de retour

Response

Response assertContentTypeText(string $message = '')

Check if the content type is text/plain

Paramètres

string $message

Valeur de retour

Response

Response assertContentTypeHtml(string $message = '')

Check if the content type is text/html

Paramètres

string $message

Valeur de retour

Response

Response assertContentTypeXml(string $message = '')

Check if the content type is text/xml

Paramètres

string $message

Valeur de retour

Response

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

Check the status code

Paramètres

int $code
string $message

Valeur de retour

Response

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

Pas de description

Paramètres

string $key
string $message

Valeur de retour

Response

Response assertKeyMatchValue(string|int $key, mixed $value, string $message = '')

Pas de description

Paramètres

string|int $key
mixed $value
string $message

Valeur de retour

Response

Response assertContains(string $text)

Check if the content contains the parsed text

Paramètres

string $text

Valeur de retour

Response

string getContent()

Get the response content

Valeur de retour

string

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

__call

Paramètres

string $method
array $params

Valeur de retour

mixed