Well, as in the title, I can think of three ways to manage testing the database output (I'm using ORM in my application, and PDO in unit tests). Which is the best one? How do you handle this?:
- Create data set with the data I want specifically for testing, and change the code so that it reads xml instead of the ORM arrays (in tests classes).
- Create setUp() method, set the attribute containing the ORM array, and work on that.
- Same as the second point, but with another database, created specifically for testing
setUp/tearDown? I would simply set up a test db (that could be a sqlite database file too) with the same schema as production.