How to change database connection on the fly for PhpUnit tests

paulg1981

New Member
I am working on a Magento 1.4.1 project, and I want to use PhpUnit to test my models.I am able to run my PhpUnit test using the default connection, but I want to use a different database connection than the one I use to test the interface.What I would like to know (if its possible):[*]Is there a way to select a differentconnection for my models before Irun all my tests; [*]Can I just add aconnection in my local.xml likethis:\[code\] <phpunit_setup> <connection> <host><![CDATA[localhost]]></host> <username><![CDATA[username]]></username> <password><![CDATA[password]]></password> <dbname><![CDATA[dbname]]></dbname> <active>1</active> </connection> </phpunit_setup>\[/code\]if yes, how do I access it.thanks.
 
Back
Top