public function matchArgs(array $args)
{
if (empty($this->_expectedArgs) && !$this->_noArgsExpectation) {
return true;
}
if ($this->isMultiArgumentClosureExpectation()) {
return $this->_matchArg($this->_expectedArgs[0], $args);
}
$argCount = count($args);
if ($argCount !== count($this->_expectedArgs)) {
return false;
}
for ($i = 0; $i < $argCount; $i++) {
$param =& $args[$i];
if (!$this->_matchArg($this->_expectedArgs[$i], $param)) {
return false;
}
}
return true;
}