MDL-55879 behat: Only hook BeforeSuite once

Before suite check and initialise behat env,
this is valid for the whole run, so no need
to do the inilialsation again
This commit is contained in:
Rajesh Taneja 2016-09-07 14:24:09 +08:00
parent 7ceab0d993
commit b468dbf533
No known key found for this signature in database
GPG key ID: B363F7FB787F80E4

View file

@ -111,6 +111,11 @@ class behat_hooks extends behat_base {
* @BeforeSuite * @BeforeSuite
*/ */
public static function before_suite_hook(BeforeSuiteScope $scope) { public static function before_suite_hook(BeforeSuiteScope $scope) {
// If behat has been initialised then no need to do this again.
if (self::$initprocessesfinished) {
return;
}
try { try {
self::before_suite($scope); self::before_suite($scope);
} catch (behat_stop_exception $e) { } catch (behat_stop_exception $e) {