lib/CucumberSteps.php in cuke4php-0.9.4 vs lib/CucumberSteps.php in cuke4php-0.9.5

- old
+ new

@@ -65,11 +65,11 @@ * @return * * Get an instance of a hook which is either a pre-set mock, * or an instance of the appropriate step class with the globals initialized */ - static function getInstance($sClass, $aGlobals) { + static function getInstance($sClass, &$aGlobals) { if (array_key_exists($sClass, self::$aMocks) && self::$aMocks[$sClass]) { return self::$aMocks[$sClass]; } else { return new $sClass($aGlobals); } @@ -81,10 +81,10 @@ public function __get($sName) { if (array_key_exists($sName, $this->aGlobals)) { return $this->aGlobals[$sName]; } else { - trigger_error("Property ($sName) not defined", E_USER_ERROR); + trigger_error("Property ($sName) not defined... can be one of [" . implode(",",array_keys($this->aGlobals)) . "]", E_USER_ERROR); } } public function __unset($sName) { unset($this->aGlobals[$sName]); \ No newline at end of file