Hi,
I am a trying to apply Test Driven Development to producing a web page and am having trouble using my database. I am developing using Cake 1.1, PHP5 and SimpleTest to unit test.
My problem is that I have a test that:
- Inserts a row using a direct SQL statement
- Tests if that row was inserted (by using a function in my main program.)
- Deletes the row that was inserted.
Both steps 1 and 3 work fine but step 2 fails.
It's important to realize that if I run the test without deleting the row (I commented that out) and then ran the test again but first eliminating step 1 (once again simply commenting that line) and the test passed without a problem.
I also tried running the SQL statements directly (one after another in the editor) in PHPMyAdmin and they work perfectly.
Any ideas?