From e8d2983d9e1d27104febf5eb5afc57ac9768e004 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Pineau?= Date: Tue, 31 Mar 2015 15:54:17 +0200 Subject: [PATCH] [VarDumper] Optimized some code --- src/Symfony/Component/VarDumper/Test/VarDumperTestCase.php | 3 +-- src/Symfony/Component/VarDumper/Test/VarDumperTestTrait.php | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) 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;