File tree Expand file tree Collapse file tree 1 file changed +5
-11
lines changed Expand file tree Collapse file tree 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)
114114
115115
116116 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 ;
126120
127121 set_error_handler (function () {}); // mute all errors
128- $ rm -> invoke ( $ me );
122+ $ this -> tearDown ( );
129123 restore_error_handler ();
130124 }
131125
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 ;
133127 });
134128 }
135129
You can’t perform that action at this time.
0 commit comments