BUG Reset DataObject caches in SapphireTest->resetDBSchema()

This became a problem with fdcd7a2e where $custom_database_fields
were cached, but never reset. It lead to extensions not applying
correctly in SapphireTest->setUpOnce().
This commit is contained in:
Ingo Schommer 2012-11-23 11:14:02 +01:00
parent a3cd7ddc09
commit 453d04e4ba

View File

@ -801,6 +801,8 @@ class SapphireTest extends PHPUnit_Framework_TestCase {
*/
public function resetDBSchema($includeExtraDataObjects = false) {
if(self::using_temp_db()) {
DataObject::reset();
// clear singletons, they're caching old extension info which is used in DatabaseAdmin->doBuild()
Injector::inst()->unregisterAllObjects();