Security update for Core, with self-updated composer
[yaffs-website] / vendor / symfony / debug / Tests / phpt / decorate_exception_hander.phpt
1 --TEST--
2 Test catching fatal errors when handlers are nested
3 --FILE--
4 <?php
5
6 namespace Symfony\Component\Debug;
7
8 $vendor = __DIR__;
9 while (!file_exists($vendor.'/vendor')) {
10     $vendor = dirname($vendor);
11 }
12 require $vendor.'/vendor/autoload.php';
13
14 set_error_handler('var_dump');
15 set_exception_handler('var_dump');
16
17 ErrorHandler::register(null, false);
18
19 if (true) {
20     class foo extends missing
21     {
22     }
23 }
24
25 ?>
26 --EXPECTF--
27 Fatal error: Class 'Symfony\Component\Debug\missing' not found in %s on line %d
28 object(Symfony\Component\Debug\Exception\ClassNotFoundException)#%d (8) {
29   ["message":protected]=>
30   string(131) "Attempted to load class "missing" from namespace "Symfony\Component\Debug".
31 Did you forget a "use" statement for another namespace?"
32   ["string":"Exception":private]=>
33   string(0) ""
34   ["code":protected]=>
35   int(0)
36   ["file":protected]=>
37   string(%d) "%s"
38   ["line":protected]=>
39   int(%d)
40   ["trace":"Exception":private]=>
41   array(0) {
42   }
43   ["previous":"Exception":private]=>
44   NULL
45   ["severity":protected]=>
46   int(1)
47 }