\Cake\TestSuite\Constraint\ResponseStatusCode

StatusCode

Summary

Methods
Properties
Constants
matches()
failureDescription()
__construct()
toString()
No public properties found
No constants found
statusCodeBetween()
_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

failureDescription()

failureDescription(mixed  $other) : string

Failure description

Parameters

mixed $other

Expected code

Returns

string

__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

_getBodyAsString()

_getBodyAsString() : string

Get the response body as string

Returns

string —

The response body.