mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
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:
parent
a3cd7ddc09
commit
453d04e4ba
@ -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();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user