Skip to content

Commit 09225c7

Browse files
committed
minor symfony#12652 [HttpFoundation] [Hackday] symfony#9942 test: Request::getContent() for null value (skler)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes symfony#12652). Discussion ---------- [HttpFoundation] [Hackday] symfony#9942 test: Request::getContent() for null value | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | symfony#9942 | License | MIT | Doc PR | Implementing test for issue symfony#9942 to confirm that the bug is already fixed. It's possibile to close the issue. Thanks also to @baiolo, @Andyroid1978 for contributions at HackDay of the SymfonyConf Commits ------- 0b9f310 [HttpFoundation] [Hackday] symfony#9942 test: Request::getContent() for null value
2 parents a029833 + 0b9f310 commit 09225c7

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/Symfony/Component/HttpFoundation/Tests/RequestTest.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -921,6 +921,13 @@ public function testGetContentReturnsResource()
921921
$this->assertTrue(feof($retval));
922922
}
923923

924+
public function testEmptyStringContentReturns()
925+
{
926+
$req = Request::create('test');
927+
928+
$this->assertEquals('', $req->getContent());
929+
}
930+
924931
/**
925932
* @expectedException \LogicException
926933
* @dataProvider getContentCantBeCalledTwiceWithResourcesProvider

0 commit comments

Comments
 (0)