Skip to content

Commit

Permalink
post form
Browse files Browse the repository at this point in the history
  • Loading branch information
devosc committed Jun 17, 2018
1 parent 8a2c385 commit e8ffda6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/Api/ControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,11 @@ function test_exception_trace()
*/
function test_post_form()
{
$GLOBALS['_POST'] = ['foo' => 'bar', 'baz' => 'bat'];

$config = include __DIR__ . '/../../config/config.php';
$config['services']['request'] = ServerRequest::with([
'data' => new Value(['foo' => 'bar', 'baz' => 'bat']),
'header' => new HttpHeaders(['content-type' => 'application/json']),
'header' => new HttpHeaders(['content-type' => 'application/x-www-form-urlencoded']),
'method' => new Value('POST'),
'uri' => new HttpUri(['path' => '/api'])
]);
Expand Down

0 comments on commit e8ffda6

Please sign in to comment.