diff options
author | Wolfy-J <[email protected]> | 2018-06-12 18:40:33 +0300 |
---|---|---|
committer | Wolfy-J <[email protected]> | 2018-06-12 18:40:33 +0300 |
commit | 87571a4aa52c4267ed88a2246cf038d88cf5b4a3 (patch) | |
tree | 03d2742a6774e7f2ebbd3ebae73450af25a65cea /php-src/tests/http/data.php | |
parent | 62518a119eb4c1372d6f1b6f1d0b75a017989c50 (diff) |
tests!
Diffstat (limited to 'php-src/tests/http/data.php')
-rw-r--r-- | php-src/tests/http/data.php | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/php-src/tests/http/data.php b/php-src/tests/http/data.php new file mode 100644 index 00000000..c5e0bab0 --- /dev/null +++ b/php-src/tests/http/data.php @@ -0,0 +1,18 @@ +<?php + +use Psr\Http\Message\ResponseInterface; +use Psr\Http\Message\ServerRequestInterface; + +function handleRequest(ServerRequestInterface $req, ResponseInterface $resp): ResponseInterface +{ + + $data = $req->getParsedBody(); + + ksort($data); + ksort($data['arr']); + ksort($data['arr']['x']['y']); + + $resp->getBody()->write(json_encode($data)); + + return $resp; +}
\ No newline at end of file |