We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 96cda9f + 844240c commit 7cd75dbCopy full SHA for 7cd75db
1 file changed
src/Framework/TestSuite.php
@@ -630,7 +630,12 @@ public function run(PHPUnit_Framework_TestResult $result = null)
630
return $result;
631
}
632
633
- $hookMethods = PHPUnit_Util_Test::getHookMethods($this->name);
+ // Get hookMethods only if this is a testcase
634
+ // Otherwise $this->name may look like UnitTest::testMethod (e.g. when using @dataProvider)
635
+ $hookMethods = array();
636
+ if ($this->testCase && class_exists($this->name, false)) {
637
+ $hookMethods = PHPUnit_Util_Test::getHookMethods($this->name);
638
+ }
639
640
$result->startTestSuite($this);
641
0 commit comments