Skip to content
Permalink
Browse files

Fix ServerRequest::input() incorrectly being set to "php://input"

Closes #9975
  • Loading branch information...
ADmad committed Jan 5, 2017
1 parent 230bc8a commit 5d061aecf47b513f554773cac9658e1f99f113e0
Showing with 11 additions and 1 deletion.
  1. +0 −1 src/Http/ServerRequestFactory.php
  2. +11 −0 tests/TestCase/Http/ServerRequestFactoryTest.php
@@ -50,7 +50,6 @@ public static function fromGlobals(
'environment' => $server,
'uri' => $uri,
'files' => $files,
'input' => 'php://input',
'cookies' => $cookies ?: $_COOKIE,
'query' => $query ?: $_GET,
'post' => $body ?: $_POST,
@@ -45,6 +45,17 @@ public function tearDown()
$_SERVER = $this->server;
}
/**
* Test fromGlobals input
*
* @return void
*/
public function testFromGlobalsInput()
{
$res = ServerRequestFactory::fromGlobals();
$this->assertSame('', $res->input());
}
/**
* Test fromGlobals includes the session
*

0 comments on commit 5d061ae

Please sign in to comment.
You can’t perform that action at this time.