trait MakesHttpRequests (View source)
$this | withoutMiddleware() Disable middleware for the test. | |
TestResponse | get(string $uri, array $headers = array()) Visit the given URI with a GET request. | |
TestResponse | getJson(string $uri, array $headers = array()) Visit the given URI with a GET request, expecting a JSON response. | |
TestResponse | post(string $uri, array $data = array(), array $headers = array()) Visit the given URI with a POST request. | |
TestResponse | postJson(string $uri, array $data = array(), array $headers = array()) Visit the given URI with a POST request, expecting a JSON response. | |
TestResponse | put(string $uri, array $data = array(), array $headers = array()) Visit the given URI with a PUT request. | |
TestResponse | putJson(string $uri, array $data = array(), array $headers = array()) Visit the given URI with a PUT request, expecting a JSON response. | |
TestResponse | patch(string $uri, array $data = array(), array $headers = array()) Visit the given URI with a PATCH request. | |
TestResponse | patchJson(string $uri, array $data = array(), array $headers = array()) Visit the given URI with a PATCH request, expecting a JSON response. | |
TestResponse | delete(string $uri, array $data = array(), array $headers = array()) Visit the given URI with a DELETE request. | |
TestResponse | deleteJson(string $uri, array $data = array(), array $headers = array()) Visit the given URI with a DELETE request, expecting a JSON response. | |
TestResponse | json(string $method, string $uri, array $data = array(), array $headers = array()) Call the given URI with a JSON request. | |
TestResponse | call(string $method, string $uri, array $parameters = array(), array $cookies = array(), array $files = array(), array $server = array(), string $content = null) Call the given URI and return the Response. |
Disable middleware for the test.
Visit the given URI with a GET request.
Visit the given URI with a GET request, expecting a JSON response.
Visit the given URI with a POST request.
Visit the given URI with a POST request, expecting a JSON response.
Visit the given URI with a PUT request.
Visit the given URI with a PUT request, expecting a JSON response.
Visit the given URI with a PATCH request.
Visit the given URI with a PATCH request, expecting a JSON response.
Visit the given URI with a DELETE request.
Visit the given URI with a DELETE request, expecting a JSON response.
Call the given URI with a JSON request.
Call the given URI and return the Response.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/5.4/Illuminate/Foundation/Testing/Concerns/MakesHttpRequests.html