Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[HttpFoundation] fixed Request::getContent() reusage bug #19549

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
split data provider in two, one for each test
  • Loading branch information
1ma committed Aug 5, 2016
commit 43e960cd14c28145258c37449d707be3b1753a68
12 changes: 10 additions & 2 deletions 12 src/Symfony/Component/HttpFoundation/Tests/RequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1042,8 +1042,16 @@ public function testGetContentCantBeCalledTwiceWithResources($first, $second)
$req->getContent($second);
}

public function getContentCantBeCalledTwiceWithResourcesProvider()
{
return array(
'Resource then fetch' => array(true, false),
'Resource then resource' => array(true, true),
);
}

/**
* @dataProvider getContentCantBeCalledTwiceWithResourcesProvider
* @dataProvider getContentCanBeCalledTwiceWithResourcesProvider
* @requires PHP 5.6
*/
public function testGetContentCanBeCalledTwiceWithResources($first, $second)
Expand All @@ -1063,7 +1071,7 @@ public function testGetContentCanBeCalledTwiceWithResources($first, $second)
$this->assertSame($a, $b);
}

public function getContentCantBeCalledTwiceWithResourcesProvider()
public function getContentCanBeCalledTwiceWithResourcesProvider()
{
return array(
'Fetch then fetch' => array(false, false),
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.