Hello,

How to reload database (using doctrine) in functional test? I mean
drop all data from all tables and load fixtures? I would like to have
clean database while running tests.

I've tried something like that:
include(dirname(__FILE__).'/../../bootstrap/functional.php');

$browser = new sfTestFunctional(new sfBrowser());
$browser->setTester('doctrine', 'sfTesterDoctrine');

Doctrine::dropDatabases();
Doctrine::createDatabases();
Doctrine::createTablesFromModels();
Doctrine::loadData(sfConfig::get('sf_test_dir').'/fixtures');

Looks like everything is working besides creating tables. I think that
models aren't loaded. Maybe i should somehow load those models or
initialize doctrine plugin? Or there is some other way to reload data?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to