Skip to content

Commit

Permalink
Made behat REST HTTP client use standard HTTP verbs
Browse files Browse the repository at this point in the history
  • Loading branch information
Bertrand Dunogier committed Sep 23, 2016
1 parent b615157 commit f040223
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,10 @@ public function setResource($resource)
*/
public function setMethod($method)
{
if (in_array(strtolower($method), ['publish', 'patch', 'move', 'swap'])) {
$this->getRequest()->addHeader("X-HTTP-Method-Override: $method");
$method = 'POST';
}
$this->getRequest()->setMethod($method);
}

Expand Down

0 comments on commit f040223

Please # to comment.