Skip to content

Commit

Permalink
- Do not try to get source for internal methods.
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Jun 24, 2007
1 parent fd9ce9a commit 8e91151
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions PHPUnit/Framework/MockObject/Mock.php
Expand Up @@ -210,11 +210,15 @@ protected function generateClassDefinition(ReflectionClass $class)
$code .= $this->generateMethodDefinition($this->className, $methodName, 'public'); $code .= $this->generateMethodDefinition($this->className, $methodName, 'public');
} }
} else { } else {
$code .= "\n" . str_replace( $method = $class->getMethod($methodName);
array($this->className . '::', 'self::'),
$this->mockClassName . '::', if (!$method->isInternal()) {
PHPUnit_Util_Class::getMethodSource($this->className, $methodName) $code .= "\n" . str_replace(
); array($this->className . '::', 'self::'),
$this->mockClassName . '::',
PHPUnit_Util_Class::getMethodSource($this->className, $methodName)
);
}
} }
} }


Expand Down

0 comments on commit 8e91151

Please sign in to comment.