Ability to load fixtures once before test class
Currently we can load fixtures:
- before each test case using PHPUnit
setup() - once before all tests by customizing Symfony bootstrap process like I suggested in liip/LiipFunctionalTestBundle#303
Only the possibility to load fixtures once before test class is missing (like we do with PHPUnit setupBeforeClass()).
So, I would like to add this ability by implementing a simple flag and a $once parameter in methods like loadFixtureFiles() as follows:
public function loadFixtureFiles(array $paths = array(), $append = false, $omName = null, $registryName = 'doctrine', $once = false)
What do you think?
It may be possible with #81 or we could add another event for that.
With the 2.x release, we removed the trait and moved the fixtures loading to a service. Could the service could be called in setupBeforeClass()?