How can I use PHPUnit to set up and tear down the database using a SQL file?
Posted
by Ben Dauphinee
on Stack Overflow
See other posts from Stack Overflow
or by Ben Dauphinee
Published on 2010-05-29T01:53:19Z
Indexed on
2010/05/29
2:02 UTC
Read the original article
Hit count: 286
I have a MySQL file that represents my database in a specific state that would allow me to test a class I am working on. What I want to do is have PHPUnit clean and rebuild the database from this file for each test or set of tests.
How can I go about that without having to resort to rewriting the data in the XML format that PHPUnit uses?
© Stack Overflow or respective owner