Property | Type | Description | |
---|---|---|---|
$currentUri | string | The current URL being viewed. | |
$response | Illuminate\Http\Response | The last response returned by the application. |
Method | Description | |
---|---|---|
assertResponseOk ( ) : void | Assert that the client response has an OK status code. | |
assertResponseStatus ( integer $code ) : void | Assert that the client response has a given code. | |
call ( string $method, string $uri, array $parameters = [], array $cookies = [], array $files = [], array $server = [], string $content = null ) : Illuminate\Http\Response | Call the given URI and return the Response. | |
delete ( string $uri, array $data = [], array $headers = [] ) | Visit the given URI with a DELETE request. | |
dontSeeJson ( array $data = null ) | Assert that the response doesn't contain JSON. | |
get ( string $uri, array $headers = [] ) | Visit the given URI with a GET request. | |
handle ( Illuminate\Http\Request $request ) | Send the given request through the application. | |
json ( string $method, string $uri, array $data = [], array $headers = [] ) | Visit the given URI with a JSON request. | |
patch ( string $uri, array $data = [], array $headers = [] ) | Visit the given URI with a PATCH request. | |
post ( string $uri, array $data = [], array $headers = [] ) | Visit the given URI with a POST request. | |
put ( string $uri, array $data = [], array $headers = [] ) | Visit the given URI with a PUT request. | |
seeJson ( array $data = null, boolean $negate = false ) | Assert that the response contains JSON. | |
seeJsonEquals ( array $data ) | Assert that the response contains an exact JSON array. | |
seeJsonStructure ( array $structure = null, array | null $responseData = null ) | Assert that the JSON response has a given structure. | |
withoutMiddleware ( ) | Disable middleware for the test. |
Method | Description | |
---|---|---|
formatToExpectedJson ( string $key, mixed $value ) : string | Format the given key and value into a JSON string for expectation checks. | |
prepareUrlForRequest ( string $uri ) : string | Turn the given URI into a fully qualified URL. | |
receiveJson ( array | null $data = null ) | Assert that the response contains JSON. | |
seeHeader ( string $headerName, mixed $value = null ) | Asserts that the response contains the given header and equals the optional value. | |
seeJsonContains ( array $data, boolean $negate = false ) | Assert that the response contains the given JSON. | |
seeStatusCode ( integer $status ) | Asserts that the status code of the response matches the given code. | |
shouldReturnJson ( array $data = null ) | Assert that the response contains JSON. | |
transformHeadersToServerVars ( array $headers ) : array | Transform headers array to array of $_SERVER vars with HTTP_* format. |
public assertResponseOk ( ) : void | ||
return | void |
public assertResponseStatus ( integer $code ) : void | ||
$code | integer | |
return | void |
public call ( string $method, string $uri, array $parameters = [], array $cookies = [], array $files = [], array $server = [], string $content = null ) : Illuminate\Http\Response | ||
$method | string | |
$uri | string | |
$parameters | array | |
$cookies | array | |
$files | array | |
$server | array | |
$content | string | |
return | Illuminate\Http\Response |
public dontSeeJson ( array $data = null ) | ||
$data | array |
public handle ( Illuminate\Http\Request $request ) | ||
$request | Illuminate\Http\Request |
protected prepareUrlForRequest ( string $uri ) : string | ||
$uri | string | |
return | string |
protected receiveJson ( array | null $data = null ) | ||
$data | array | null |
protected seeJsonContains ( array $data, boolean $negate = false ) | ||
$data | array | |
$negate | boolean |
public seeJsonEquals ( array $data ) | ||
$data | array |
protected seeStatusCode ( integer $status ) | ||
$status | integer |
protected shouldReturnJson ( array $data = null ) | ||
$data | array |
protected transformHeadersToServerVars ( array $headers ) : array | ||
$headers | array | |
return | array |
protected string $currentUri | ||
return | string |