Yii-abstract-sqlite-test-case is a project mainly written in PHP, it's free.
Base class for running unit tests using in-memory SQLite database
Base class for running unit tests using in-memory SQLite database
Running tests this way you can get rid of creating database files on a hard drive (your tests will run faster) and allows you don't make changes in a development database.
PHP 5.3+
Samples: https://github.com/sergey-s/yii-composite-unique-key-validatable/tree/master/tests/unit