File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments