mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00: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) {
|
public function resetDBSchema($includeExtraDataObjects = false) {
|
||||||
if(self::using_temp_db()) {
|
if(self::using_temp_db()) {
|
||||||
|
DataObject::reset();
|
||||||
|
|
||||||
// clear singletons, they're caching old extension info which is used in DatabaseAdmin->doBuild()
|
// clear singletons, they're caching old extension info which is used in DatabaseAdmin->doBuild()
|
||||||
Injector::inst()->unregisterAllObjects();
|
Injector::inst()->unregisterAllObjects();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user