How would I go about unit testing when using RedBean ORM? It uses static methods (R::dispense()
, R::store()
, etc.) so how can I create a mock object?
Or should I just forget about that idea and simply use a test database which gets nuke()
'd at the beginning of each test suite? I'm new to both RedBean and unit testing, but something doesn't sound right about that approach... wouldn't it be on the border of integration testing if I'm using a real database?
Aucun commentaire:
Enregistrer un commentaire