Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions src/Illuminate/Foundation/Testing/Concerns/MakesHttpRequests.php
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,34 @@ public function deleteJson($uri, array $data = [], array $headers = [])
return $this->json('DELETE', $uri, $data, $headers);
}

/**
* Visit the given URI with a OPTION request.
*
* @param string $uri
* @param array $data
* @param array $headers
* @return \Illuminate\Foundation\Testing\TestResponse
*/
public function option($uri, array $data = [], array $headers = [])
{
$server = $this->transformHeadersToServerVars($headers);

return $this->call('OPTION', $uri, $data, [], [], $server);
}

/**
* Visit the given URI with a OPTION request, expecting a JSON response.
*
* @param string $uri
* @param array $data
* @param array $headers
* @return \Illuminate\Foundation\Testing\TestResponse
*/
public function optionJson($uri, array $data = [], array $headers = [])
{
return $this->json('OPTION', $uri, $data, $headers);
}

/**
* Call the given URI with a JSON request.
*
Expand Down