liip/LiipFunctionalTestBundle — pull request #85 by RLovelett (2013-04-04 16:22:15+00:00)
Title: Remove Cached Databases on Test Finish

When `cache_sqlite_db` is in use the cached databases should be destroyed after each test run.

That way if the fixture as changed the new fixtures are loaded and then cached. Currently, if the fixtures change the cached databases will not reflect those changes until the cached databases are deleted and the tests run again.

This is especially important for someone using [guard-phpunit](https://github.com/Maher4Ever/guard-phpunit).

Exerpt from WebTestCase.php (lines 210-223).
```
if (file_exists($backup) && file_exists($backup.'.ser')) {
$om->flush();
$om->clear();

$executor = new $executorClass($om);
$executor->setReferenceRepository($referenceRepository);
$executor->getReferenceRepository()->load($backup);

copy($backup, $name);

$this->postFixtureRestore();

return $executor;
}
```