This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use Stack Overflow.

[SOLVED] [Day 13] All data is erased by test.

Discussion around this tutorial for symfony 1.2-1.4

[SOLVED] [Day 13] All data is erased by test.

by Davorian » Mon Apr 02, 2012 8:46 am

At the end of Day 13 "The User", tests are added relating to the job viewing history. The JobeetTestFunctional::loadData() method is called to reload fixture data before the new tests are run.

For me, this second call to loadData() erases all data in the database without reloading the fixtures, resulting in a blank database and a failed test. It appears that any call to this method after the first connection by the $browser object produces this behaviour.

What could be producing this behaviour? Is there a good way to see logs of what Doctrine_Core might be doing behind the scenes?

Any help would be appreciated.

Edit: Solved. Turns out I skipped the part where you copy the fixture files into the test directory, so there was nothing to load. I don't know why the first call worked, but now the whole application works as expected.
Junior Member
Posts: 1
Joined: Mon Apr 02, 2012 8:31 am