Mongounit is a PHPUnit extension modeled after dbunit that allows for fixture-based unit testing of mongo db backed code.
One of our more recent projects has given the team exposure to MongoDB. As such, we needed an easy way to test the models that utilize mongo in a similar fashion to how we test models that talk to mysql. Using this framework, it’s easy to implement mongo test cases to easily create fixture data in collections, or simply clear collections between test cases.
See an example Testcase