Permalink
Browse files

create new instance for cases where no special mock function was requ…

…ested
  • Loading branch information...
mikey179 committed Jan 22, 2012
1 parent 0af7c54 commit 1b439e4af6fb1b71c474fdd8bbdc5ba2c947dce3
Showing with 1 addition and 2 deletions.
  1. +1 −2 PHPUnit/Framework/MockObject/MockFunction.php
@@ -81,15 +81,14 @@ public function __construct($functionName)
/**
* @param string $functionName
* @return PHPUnit_Framework_MockObject_MockFunction
- * @throws LogicException
*/
public static function getInstance($functionName)
{
if (isset(self::$mocks[$functionName])) {
return self::$mocks[$functionName];
}
- throw new LogicException('Missing mock for function ' . $functionName);
+ return new self($functionName);
}
/**

0 comments on commit 1b439e4

Please sign in to comment.