\Cake\TestSuite\Constraint\ResponseStatusFailure

StatusFailure

Summary

Methods
Properties
Constants
matches()
__construct()
toString()
No public properties found
No constants found
statusCodeBetween()
failureDescription()
_getBodyAsString()
$code
$response
N/A
No private methods found
No private properties found
N/A

Properties

$code

$code : integer|array

Type

integer|array

Methods

matches()

matches(integer|array  $other) : boolean

Check assertion

Parameters

integer|array $other

Array of min/max status codes, or a single code

Returns

boolean

__construct()

__construct(\Cake\Http\Response  $response) 

Constructor

Parameters

\Cake\Http\Response $response

Response

toString()

toString() : string

Assertion message

Returns

string

statusCodeBetween()

statusCodeBetween(integer  $min, integer  $max) : boolean

Helper for checking status codes

Parameters

integer $min

Min status code (inclusive)

integer $max

Max status code (inclusive)

Returns

boolean

failureDescription()

failureDescription(mixed  $other) : string

Overwrites the descriptions so we can remove the automatic "expected" message

Parameters

mixed $other

Value

Returns

string

_getBodyAsString()

_getBodyAsString() : string

Get the response body as string

Returns

string —

The response body.