MDL-38828 behat: Moving init before purge_cache

This commit is contained in:
David Monllao
2013-04-02 11:24:00 +08:00
parent a5efbe6161
commit c8619f33e1
+3 -3
View File
@@ -116,6 +116,9 @@ class behat_hooks extends behat_base {
throw new coding_exception('Behat only can modify the test database and the test dataroot!');
}
// Avoid some notices / warnings.
$SESSION = new stdClass();
behat_util::reset_database();
behat_util::reset_dataroot();
@@ -128,9 +131,6 @@ class behat_hooks extends behat_base {
// Assing valid data to admin user (some generator-related code needs a valid user).
$user = $DB->get_record('user', array('username' => 'admin'));
session_set_user($user);
// Avoid some notices / warnings.
$SESSION = new stdClass();
}
/**