Skip to content

Commit f12e10f

Browse files
committed
fixed autoloader-issue with not-existing-files, regression in cad11af
1 parent c7e9e4b commit f12e10f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: src/Framework/TestSuite.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,7 @@ public function run(PHPUnit_Framework_TestResult $result = null)
638638
$this->setUp();
639639

640640
foreach ($hookMethods['beforeClass'] as $beforeClassMethod) {
641-
if (method_exists($this->name, $beforeClassMethod)) {
641+
if ($this->testCase === true && class_exists($this->name, false) && method_exists($this->name, $beforeClassMethod)) {
642642
call_user_func(array($this->name, $beforeClassMethod));
643643
}
644644
}
@@ -676,7 +676,7 @@ public function run(PHPUnit_Framework_TestResult $result = null)
676676
}
677677

678678
foreach ($hookMethods['afterClass'] as $afterClassMethod) {
679-
if (method_exists($this->name, $afterClassMethod)) {
679+
if ($this->testCase === true && class_exists($this->name, false) && method_exists($this->name, $afterClassMethod)) {
680680
call_user_func(array($this->name, $afterClassMethod));
681681
}
682682
}

0 commit comments

Comments
 (0)