From 478a0312fd4dade04c8e4fa93c042ecd6da97183 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Tue, 22 Dec 2015 12:36:46 +0100 Subject: [PATCH] [Routing] Reduce memory usage of a high consuming test case --- .../Tests/Generator/Dumper/PhpGeneratorDumperTest.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Symfony/Component/Routing/Tests/Generator/Dumper/PhpGeneratorDumperTest.php b/src/Symfony/Component/Routing/Tests/Generator/Dumper/PhpGeneratorDumperTest.php index e55a6ccf88..783d694d1c 100644 --- a/src/Symfony/Component/Routing/Tests/Generator/Dumper/PhpGeneratorDumperTest.php +++ b/src/Symfony/Component/Routing/Tests/Generator/Dumper/PhpGeneratorDumperTest.php @@ -91,10 +91,10 @@ class PhpGeneratorDumperTest extends \PHPUnit_Framework_TestCase } $this->routeCollection->add('Test2', new Route('/testing2')); - $data = $this->generatorDumper->dump(array( + file_put_contents($this->largeTestTmpFilepath, $this->generatorDumper->dump(array( 'class' => 'ProjectLargeUrlGenerator', - )); - file_put_contents($this->largeTestTmpFilepath, $data); + ))); + $this->routeCollection = $this->generatorDumper = null; include $this->largeTestTmpFilepath; $projectUrlGenerator = new \ProjectLargeUrlGenerator(new RequestContext('/app.php'));