Skip to content

Instantly share code, notes, and snippets.

@jsenin
Last active June 8, 2016 15:35
Show Gist options
  • Save jsenin/9a96b873e2dd98927db195c7275f9688 to your computer and use it in GitHub Desktop.
Save jsenin/9a96b873e2dd98927db195c7275f9688 to your computer and use it in GitHub Desktop.
laravel testing call params explanation $this->call()
$response = $this->call(
'POST',
$path = '/api/foo,
$params,
[],
['file' => $uploadedFile], // instance of new \Symfony\Component\HttpFoundation\File\UploadedFile
$auth
);
call($method, $uri, $parameters = [], $cookies = [], $files = [], $server = [], $headers = null)
http-foundation/Request.php
public function initialize(array $query = array(), array $request = array(), array $attributes = array(), array $cookies = array(), array $files = array(), array $server = array(), $content = null)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment