File tree 1 file changed +5
-11
lines changed
1 file changed +5
-11
lines changed Original file line number Diff line number Diff line change @@ -114,22 +114,16 @@ public function runTest($method, array $args = NULL)
114
114
115
115
116
116
if ($ this ->prevErrorHandler === FALSE ) {
117
- $ me = $ this ;
118
- $ handleErrors = & $ this ->handleErrors ;
119
- $ prev = & $ this ->prevErrorHandler ;
120
-
121
- $ prev = set_error_handler (function ($ severity ) use ($ me , & $ prev , & $ handleErrors ) {
122
- if ($ handleErrors && ($ severity & error_reporting ()) === $ severity ) {
123
- $ handleErrors = FALSE ;
124
- $ rm = new \ReflectionMethod ($ me , 'tearDown ' );
125
- $ rm ->setAccessible (TRUE );
117
+ $ this ->prevErrorHandler = set_error_handler (function ($ severity ) {
118
+ if ($ this ->handleErrors && ($ severity & error_reporting ()) === $ severity ) {
119
+ $ this ->handleErrors = FALSE ;
126
120
127
121
set_error_handler (function () {}); // mute all errors
128
- $ rm -> invoke ( $ me );
122
+ $ this -> tearDown ( );
129
123
restore_error_handler ();
130
124
}
131
125
132
- return $ prev ? call_user_func_array ($ prev , func_get_args ()) : FALSE ;
126
+ return $ this -> prevErrorHandler ? call_user_func_array ($ this -> prevErrorHandler , func_get_args ()) : FALSE ;
133
127
});
134
128
}
135
129
You can’t perform that action at this time.
0 commit comments