ENHANCEMENT Prevent test DBs persisting after testing

This commit is contained in:
Damian Mooyman 2016-11-30 10:59:37 +13:00
parent 7c23443fb6
commit 0e92ecea0c
No known key found for this signature in database
GPG Key ID: 78B823A10DE27D1A

View File

@ -1082,6 +1082,11 @@ class SapphireTest extends PHPUnit_Framework_TestCase
// Reinstate PHPUnit error handling
set_error_handler(array('PHPUnit_Util_ErrorHandler', 'handleError'));
// Ensure test db is killed on exit
register_shutdown_function(function () {
static::kill_temp_db();
});
return $dbname;
}