minor #17104 [Routing] Reduce memory usage of a high consuming test case (nicolas-grekas)

This PR was merged into the 2.3 branch.

Discussion
----------

[Routing] Reduce memory usage of a high consuming test case

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Tests fail transiently on hhvm because of the high memory usage of this test case.
This patch cuts it by two.

See this blackfire comparison graph on the Memory dimension:
https://blackfire.io/profiles/compare/fd72ee66-e4d0-4ac2-92bf-16dd3849ef4c/graph?settings%5Bdimension%5D=pmu

Commits
-------

478a031 [Routing] Reduce memory usage of a high consuming test case
This commit is contained in:
Nicolas Grekas 2015-12-22 12:50:18 +01:00
commit ff56eb2350

View File

@ -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'));