public function __call($method, $args)
{
if (isset($this->methods[$method])) {
foreach ($this->methods[$method] as $quip) {
if ($args == $quip['expectation']) {
return $quip['value'] instanceof \Closure ? $quip['value']($this->mime) : $quip['value'];
}
}
throw new \Exception(sprintf('The method %s was never mimicked with the provided expectations: %s', $method, print_r($args, TRUE)));
} else {
throw new \Exception(sprintf('The method %s was never mimicked', $method));
}
}