MDL-39478 behat: New constant to detect when the test site is running

Also removing an unused var and method.
This commit is contained in:
David Monllao
2013-05-07 11:12:01 +08:00
parent 081bfdc5ff
commit cfcbc34a61
4 changed files with 24 additions and 26 deletions
+1 -1
View File
@@ -1128,7 +1128,7 @@ function session_set_user($user) {
}
sesskey(); // init session key
if (PHPUNIT_TEST || defined('BEHAT_RUNNING')) {
if (PHPUNIT_TEST || defined('BEHAT_TEST')) {
// phpunit tests use reversed reference
global $USER;
$USER = $_SESSION['USER'];