trait AssertsStatusCodes (View source)

Methods

$this
assertOk()

Assert that the response has a 200 "OK" status code.

$this
assertCreated()

Assert that the response has a 201 "Created" status code.

$this
assertAccepted()

Assert that the response has a 202 "Accepted" status code.

$this
assertNoContent(int $status = 204)

Assert that the response has the given status code and no content.

$this
assertMovedPermanently()

Assert that the response has a 301 "Moved Permanently" status code.

$this
assertFound()

Assert that the response has a 302 "Found" status code.

$this
assertNotModified()

Assert that the response has a 304 "Not Modified" status code.

$this
assertTemporaryRedirect()

Assert that the response has a 307 "Temporary Redirect" status code.

$this
assertPermanentRedirect()

Assert that the response has a 308 "Permanent Redirect" status code.

$this
assertBadRequest()

Assert that the response has a 400 "Bad Request" status code.

$this
assertUnauthorized()

Assert that the response has a 401 "Unauthorized" status code.

$this
assertPaymentRequired()

Assert that the response has a 402 "Payment Required" status code.

$this
assertForbidden()

Assert that the response has a 403 "Forbidden" status code.

$this
assertNotFound()

Assert that the response has a 404 "Not Found" status code.

$this
assertMethodNotAllowed()

Assert that the response has a 405 "Method Not Allowed" status code.

$this
assertNotAcceptable()

Assert that the response has a 406 "Not Acceptable" status code.

$this
assertRequestTimeout()

Assert that the response has a 408 "Request Timeout" status code.

$this
assertConflict()

Assert that the response has a 409 "Conflict" status code.

$this
assertGone()

Assert that the response has a 410 "Gone" status code.

$this
assertUnsupportedMediaType()

Assert that the response has a 415 "Unsupported Media Type" status code.

$this
assertUnprocessable()

Assert that the response has a 422 "Unprocessable Entity" status code.

$this
assertTooManyRequests()

Assert that the response has a 429 "Too Many Requests" status code.

$this
assertInternalServerError()

Assert that the response has a 500 "Internal Server Error" status code.

$this
assertServiceUnavailable()

Assert that the response has a 503 "Service Unavailable" status code.

Details

$this assertOk()

Assert that the response has a 200 "OK" status code.

Return Value

$this

$this assertCreated()

Assert that the response has a 201 "Created" status code.

Return Value

$this

$this assertAccepted()

Assert that the response has a 202 "Accepted" status code.

Return Value

$this

$this assertNoContent(int $status = 204)

Assert that the response has the given status code and no content.

Parameters

int $status

Return Value

$this

$this assertMovedPermanently()

Assert that the response has a 301 "Moved Permanently" status code.

Return Value

$this

$this assertFound()

Assert that the response has a 302 "Found" status code.

Return Value

$this

$this assertNotModified()

Assert that the response has a 304 "Not Modified" status code.

Return Value

$this

$this assertTemporaryRedirect()

Assert that the response has a 307 "Temporary Redirect" status code.

Return Value

$this

$this assertPermanentRedirect()

Assert that the response has a 308 "Permanent Redirect" status code.

Return Value

$this

$this assertBadRequest()

Assert that the response has a 400 "Bad Request" status code.

Return Value

$this

$this assertUnauthorized()

Assert that the response has a 401 "Unauthorized" status code.

Return Value

$this

$this assertPaymentRequired()

Assert that the response has a 402 "Payment Required" status code.

Return Value

$this

$this assertForbidden()

Assert that the response has a 403 "Forbidden" status code.

Return Value

$this

$this assertNotFound()

Assert that the response has a 404 "Not Found" status code.

Return Value

$this

$this assertMethodNotAllowed()

Assert that the response has a 405 "Method Not Allowed" status code.

Return Value

$this

$this assertNotAcceptable()

Assert that the response has a 406 "Not Acceptable" status code.

Return Value

$this

$this assertRequestTimeout()

Assert that the response has a 408 "Request Timeout" status code.

Return Value

$this

$this assertConflict()

Assert that the response has a 409 "Conflict" status code.

Return Value

$this

$this assertGone()

Assert that the response has a 410 "Gone" status code.

Return Value

$this

$this assertUnsupportedMediaType()

Assert that the response has a 415 "Unsupported Media Type" status code.

Return Value

$this

$this assertUnprocessable()

Assert that the response has a 422 "Unprocessable Entity" status code.

Return Value

$this

$this assertTooManyRequests()

Assert that the response has a 429 "Too Many Requests" status code.

Return Value

$this

$this assertInternalServerError()

Assert that the response has a 500 "Internal Server Error" status code.

Return Value

$this

$this assertServiceUnavailable()

Assert that the response has a 503 "Service Unavailable" status code.

Return Value

$this