Skip to content

Commit e8ffda6

Browse files
committed
post form
1 parent 8a2c385 commit e8ffda6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/Api/ControllerTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,11 @@ function test_exception_trace()
103103
*/
104104
function test_post_form()
105105
{
106+
$GLOBALS['_POST'] = ['foo' => 'bar', 'baz' => 'bat'];
107+
106108
$config = include __DIR__ . '/../../config/config.php';
107109
$config['services']['request'] = ServerRequest::with([
108-
'data' => new Value(['foo' => 'bar', 'baz' => 'bat']),
109-
'header' => new HttpHeaders(['content-type' => 'application/json']),
110+
'header' => new HttpHeaders(['content-type' => 'application/x-www-form-urlencoded']),
110111
'method' => new Value('POST'),
111112
'uri' => new HttpUri(['path' => '/api'])
112113
]);

0 commit comments

Comments
 (0)