Skip to content

Commit f12e10f

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

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/Framework/TestSuite.php

Lines changed: 2 additions & 2 deletions
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)