MDL-33550 reset repository static cache between unit tests

This commit is contained in:
Marina Glancy
2012-06-14 16:21:04 +08:00
parent cfc4db405c
commit 6fd1cf05b0
2 changed files with 17 additions and 4 deletions
+4 -1
View File
@@ -612,8 +612,11 @@ class phpunit_util {
get_string_manager()->reset_caches();
events_get_handlers('reset');
textlib::reset_caches();
if (class_exists('repository')) {
repository::reset_caches();
}
$GROUPLIB_CACHE = null;
//TODO: add more resets here and probably refactor them to new core function
//TODO MDL-25290: add more resets here and probably refactor them to new core function
// purge dataroot directory
self::reset_dataroot();