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