\Cake\TestSuite\Constraint\ResponseStatusCodeBase

StatusCodeBase

Summary

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

Properties

$code

$code : integer|array

Type

integer|array

Methods

__construct()

__construct(\Cake\Http\Response  $response) 

Constructor

Parameters

\Cake\Http\Response $response

Response

matches()

matches(integer|array  $other) : boolean

Check assertion

Parameters

integer|array $other

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

Returns

boolean

_getBodyAsString()

_getBodyAsString() : string

Get the response body as string

Returns

string —

The response body.

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