Skip to content

Commit 478a031

Browse files
[Routing] Reduce memory usage of a high consuming test case
1 parent bbc53dd commit 478a031

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Symfony/Component/Routing/Tests/Generator/Dumper/PhpGeneratorDumperTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,10 @@ public function testDumpWithTooManyRoutes()
9191
}
9292
$this->routeCollection->add('Test2', new Route('/testing2'));
9393

94-
$data = $this->generatorDumper->dump(array(
94+
file_put_contents($this->largeTestTmpFilepath, $this->generatorDumper->dump(array(
9595
'class' => 'ProjectLargeUrlGenerator',
96-
));
97-
file_put_contents($this->largeTestTmpFilepath, $data);
96+
)));
97+
$this->routeCollection = $this->generatorDumper = null;
9898
include $this->largeTestTmpFilepath;
9999

100100
$projectUrlGenerator = new \ProjectLargeUrlGenerator(new RequestContext('/app.php'));

0 commit comments

Comments
 (0)