File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -519,20 +519,24 @@ public function testAliasDefinitionContainsUnsupportedElements()
519
519
520
520
$ deprecations = array ();
521
521
set_error_handler (function ($ type , $ msg ) use (&$ deprecations ) {
522
- if (E_USER_DEPRECATED === $ type ) {
523
- $ deprecations [] = $ msg ;
522
+ if (E_USER_DEPRECATED !== $ type ) {
523
+ restore_error_handler ();
524
+
525
+ return call_user_func_array ('PHPUnit_Util_ErrorHandler::handleError ' , func_get_args ());
524
526
}
527
+
528
+ $ deprecations [] = $ msg ;
525
529
});
526
530
527
531
$ loader ->load ('legacy_invalid_alias_definition.xml ' );
528
532
533
+ restore_error_handler ();
534
+
529
535
$ this ->assertTrue ($ container ->has ('bar ' ));
530
536
531
537
$ this ->assertCount (3 , $ deprecations );
532
538
$ this ->assertContains ('Using the attribute "class" is deprecated for alias definition "bar" ' , $ deprecations [0 ]);
533
539
$ this ->assertContains ('Using the element "tag" is deprecated for alias definition "bar" ' , $ deprecations [1 ]);
534
540
$ this ->assertContains ('Using the element "factory" is deprecated for alias definition "bar" ' , $ deprecations [2 ]);
535
-
536
- restore_error_handler ();
537
541
}
538
542
}
You can’t perform that action at this time.
0 commit comments