Permalink
Browse files

- Merge [3935].

  • Loading branch information...
1 parent c4e141a commit e068a1a7cac639003b197952fd43d3ed116bb12f @sebastianbergmann committed Nov 4, 2008
Showing with 4 additions and 3 deletions.
  1. +4 −3 PHPUnit/Util/Test.php
View
@@ -219,14 +219,15 @@ public static function getProvidedData($className, $methodName)
$dataProviderClassName = $className;
}
- $dataProviderMethod = new ReflectionMethod(
- $dataProviderClassName, $dataProviderMethodName
+ $dataProviderClass = new ReflectionClass($dataProviderClassName);
+ $dataProviderMethod = $dataProviderClass->getMethod(
+ $dataProviderMethodName
);
if ($dataProviderMethod->isStatic()) {
$object = NULL;
} else {
- $object = $dataProviderMethod->getDeclaringClass()->newInstance();
+ $object = $dataProviderClass->newInstance();
}
if ($dataProviderMethod->getNumberOfParameters() == 0) {

0 comments on commit e068a1a

Please sign in to comment.