trait Illuminate / Testing / Concerns / AssertsStatusCodes

AssertsStatusCodes

Methods

public

assertOk ( ) : $this

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

public

assertCreated ( ) : $this

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

public

assertAccepted ( ) : $this

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

public

assertNoContent ( $status ) : $this

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

Parameters

  • $status int
public

assertMovedPermanently ( ) : $this

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

public

assertFound ( ) : $this

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

public

assertNotModified ( ) : $this

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

public

assertTemporaryRedirect ( ) : $this

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

public

assertPermanentRedirect ( ) : $this

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

public

assertBadRequest ( ) : $this

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

public

assertUnauthorized ( ) : $this

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

public

assertPaymentRequired ( ) : $this

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

public

assertForbidden ( ) : $this

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

public

assertNotFound ( ) : $this

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

public

assertMethodNotAllowed ( ) : $this

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

public

assertNotAcceptable ( ) : $this

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

public

assertRequestTimeout ( ) : $this

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

public

assertConflict ( ) : $this

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

public

assertGone ( ) : $this

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

public

assertUnsupportedMediaType ( ) : $this

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

public

assertUnprocessable ( ) : $this

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

public

assertTooManyRequests ( ) : $this

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

public

assertInternalServerError ( ) : $this

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

public

assertServiceUnavailable ( ) : $this

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