diff --git a/src/Symfony/Component/VarDumper/Test/VarDumperTestCase.php b/src/Symfony/Component/VarDumper/Test/VarDumperTestCase.php index 42a915e8ed..565514c97e 100644 --- a/src/Symfony/Component/VarDumper/Test/VarDumperTestCase.php +++ b/src/Symfony/Component/VarDumper/Test/VarDumperTestCase.php @@ -36,8 +36,7 @@ abstract class VarDumperTestCase extends \PHPUnit_Framework_TestCase $dumper = new CliDumper($h); $dumper->setColors(false); $dumper->dump($cloner->cloneVar($data)->withRefHandles(false)); - fseek($h, 0); - $data = stream_get_contents($h); + $data = stream_get_contents($h, -1, 0); fclose($h); return $data; diff --git a/src/Symfony/Component/VarDumper/Test/VarDumperTestTrait.php b/src/Symfony/Component/VarDumper/Test/VarDumperTestTrait.php index 130447bcf6..301962941d 100644 --- a/src/Symfony/Component/VarDumper/Test/VarDumperTestTrait.php +++ b/src/Symfony/Component/VarDumper/Test/VarDumperTestTrait.php @@ -36,8 +36,7 @@ trait VarDumperTestTrait $dumper = new CliDumper($h); $dumper->setColors(false); $dumper->dump($cloner->cloneVar($data)->withRefHandles(false)); - fseek($h, 0); - $data = stream_get_contents($h); + $data = stream_get_contents($h, -1, 0); fclose($h); return $data;