Skip to content

Commit

Permalink
Merge pull request #11 from bastiaan89/master
Browse files Browse the repository at this point in the history
Add method spoofing when submitting forms
  • Loading branch information
JeffreyWay committed Mar 26, 2015
2 parents daef400 + 07c5f43 commit fddf8c3
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/Extensions/Laravel.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,4 +144,15 @@ protected function handleInternalError($message = null)

throw new PHPUnitException($message);
}

/**
* Enable method spoofing for HTML forms with a "_method" attribute.
*
* @see Symfony\Component\HttpFoundation\Request::enableHttpMethodParameterOverride()
* @setUp
*/
protected function enableMethodSpoofing()
{
$this->app['request']->enableHttpMethodParameterOverride();
}
}

0 comments on commit fddf8c3

Please sign in to comment.