minor #11321 [HttpKernel] Ensure the storage exists before purging it in ProfilerTest (penyaskito)

This PR was merged into the 2.3 branch.

Discussion
----------

[HttpKernel] Ensure the storage exists before purging it in ProfilerTest

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

Commits
-------

eb63270 bug #11319 [HttpKernel] Ensure the storage exists before purging it in ProfilerTest
This commit is contained in:
Fabien Potencier 2014-07-06 20:21:17 +02:00
commit 7d88e37cbe
1 changed files with 5 additions and 3 deletions

View File

@ -79,9 +79,11 @@ class ProfilerTest extends \PHPUnit_Framework_TestCase
protected function tearDown()
{
$this->storage->purge();
$this->storage = null;
if (null !== $this->storage) {
$this->storage->purge();
$this->storage = null;
@unlink($this->tmp);
@unlink($this->tmp);
}
}
}