mirror of
https://github.com/opensupports/opensupports.git
synced 2025-08-15 23:08:35 +02:00
[Ivan Diaz] - Update testing values
This commit is contained in:
parent
0aa88b42ef
commit
814c8d5448
2
package.json
Normal file → Executable file
2
package.json
Normal file → Executable file
@ -20,7 +20,7 @@
|
||||
"npm": "^2.1.x"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "jest"
|
||||
"test": "export NODE_PATH=src && jest"
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel-core": "^5.8.22",
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ namespace RedBeanPHP {
|
||||
if (self::$functionList[$key]) {
|
||||
$function = self::$functionList[$key];
|
||||
|
||||
return $function($arguments);
|
||||
return call_user_func_array($function, $arguments);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user