Symfony2 - reset envirnonment based on PHPUnit configuration
I am trying to set up two specific PHPUnit test environments for Symfony2.
I am using Ant to run PHPUnit, so when I run the two commands below I
would expect the following results:
ant test
Runs the test suite using MySQL databse. (matching staging and production
envs)
ant ramdisk
Runs the test suite using a SQLite ramdisk. (super fast!)
I can figure out how to set up the MySQL & SQLite for PHPUnit
individually, quite easily.
How do I get PHPUnit to specify a particular environment to use?
Our base class for testing sets up the environment, but I cannot figure
out how to get a variable into here from PHPUnit so that I can
conditionally set the environment.
I have tried a different bootstrap for ramdisk, but since the base test
class sets the environment I could not make much progress.
Any ideas?
No comments:
Post a Comment