From e8ffda684e37b94e75c5d3ca4022666e8c0e6707 Mon Sep 17 00:00:00 2001 From: devosc Date: Sun, 17 Jun 2018 15:10:25 -0500 Subject: [PATCH] post form --- tests/Api/ControllerTest.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/Api/ControllerTest.php b/tests/Api/ControllerTest.php index e5f69db..783bbc2 100644 --- a/tests/Api/ControllerTest.php +++ b/tests/Api/ControllerTest.php @@ -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']) ]);