[Ivan Diaz] - Update testing values

This commit is contained in:
Ivan Diaz 2015-12-29 17:42:36 -03:00
parent 0aa88b42ef
commit 814c8d5448
3 changed files with 6 additions and 3 deletions

2
package.json Normal file → Executable file
View File

@ -20,7 +20,7 @@
"npm": "^2.1.x"
},
"scripts": {
"test": "jest"
"test": "export NODE_PATH=src && jest"
},
"devDependencies": {
"babel-core": "^5.8.22",

View File

@ -34,7 +34,10 @@ class Stub {
}
public function hasBeenCalledWithArgs() {
$argumentsMatchAssertion = serialize(func_get_args()) === serialize($this->lastArgs[0]);
$newArgs = func_get_args();
$oldArgs = $this->lastArgs;
$argumentsMatchAssertion = json_encode($newArgs) === json_encode($oldArgs);
return $this->timesCalled && $argumentsMatchAssertion;
}

View File

@ -21,7 +21,7 @@ namespace RedBeanPHP {
if (self::$functionList[$key]) {
$function = self::$functionList[$key];
return $function($arguments);
return call_user_func_array($function, $arguments);
}
}