File tree 1 file changed +2
-2
lines changed
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -638,7 +638,7 @@ public function run(PHPUnit_Framework_TestResult $result = null)
638
638
$ this ->setUp ();
639
639
640
640
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 )) {
642
642
call_user_func (array ($ this ->name , $ beforeClassMethod ));
643
643
}
644
644
}
@@ -676,7 +676,7 @@ public function run(PHPUnit_Framework_TestResult $result = null)
676
676
}
677
677
678
678
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 )) {
680
680
call_user_func (array ($ this ->name , $ afterClassMethod ));
681
681
}
682
682
}
You can’t perform that action at this time.
0 commit comments