MDL-37656 behat: Adding hooks

At suite, scenario and step levels
This commit is contained in:
David Monllao
2013-01-29 12:57:03 +08:00
parent d4322e3859
commit f5ceb6c233
2 changed files with 174 additions and 1 deletions
+1 -1
View File
@@ -1128,7 +1128,7 @@ function session_set_user($user) {
}
sesskey(); // init session key
if (PHPUNIT_TEST) {
if (PHPUNIT_TEST || defined('BEHAT_RUNNING')) {
// phpunit tests use reversed reference
global $USER;
$USER = $_SESSION['USER'];