Commit 03a836b1 authored by Ghislain Loas's avatar Ghislain Loas

fix call to __toString on object in ObjectWrapper

parent 5f6d0830
Pipeline #4464 passed with stage
in 7 seconds
......@@ -38,7 +38,23 @@ class Storm_Test_Mock extends StdClass {
public function __call($method, $args) {
throw new Storm_Test_ObjectWrapperException('['.$this->toString().'] cannot execute "'.$method.'(' . implode(',', $args) . ')"');
throw new Storm_Test_ObjectWrapperException('['.$this->toString().'] cannot execute "'.$method.'(' . implode(',', $this->_argsToString($args)) . ')"');
}
protected function _argsToString($args) {
$new_args = [];
foreach($args as $arg)
$new_args [] = $this->_argToSring($arg);
return $new_args;
}
protected function _argToSring($arg) {
return is_object($arg)
? get_class($arg)
: $arg;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment