diff --git a/lib/behat/classes/util.php b/lib/behat/classes/util.php index 713bb9f89a5e5..ee1f112a1028e 100644 --- a/lib/behat/classes/util.php +++ b/lib/behat/classes/util.php @@ -294,6 +294,12 @@ protected final static function get_test_file_path() { * Reset contents of all database tables to initial values, reset caches, etc. */ public static function reset_all_data() { + // Reset database. + self::reset_database(); + + // Purge dataroot directory. + self::reset_dataroot(); + // Reset all static caches. accesslib_clear_all_caches(true); // Reset the nasty strings list used during the last test. @@ -310,11 +316,5 @@ public static function reset_all_data() { // Inform data generator. self::get_data_generator()->reset(); - - // Purge dataroot directory. - self::reset_dataroot(); - - // Reset database. - self::reset_database(); } }