Mercurial > hg > cmmr2012-drupal-site
diff vendor/symfony/debug/Resources/ext/tests/002.phpt @ 0:c75dbcec494b
Initial commit from drush-created site
author | Chris Cannam |
---|---|
date | Thu, 05 Jul 2018 14:24:15 +0000 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/vendor/symfony/debug/Resources/ext/tests/002.phpt Thu Jul 05 14:24:15 2018 +0000 @@ -0,0 +1,65 @@ +--TEST-- +Test symfony_debug_backtrace in case of fatal error +--SKIPIF-- +<?php if (!extension_loaded('symfony_debug')) { + echo 'skip'; +} ?> +--FILE-- +<?php + +function bar() +{ + foo(); +} + +function foo() +{ + notexist(); +} + +function bt() +{ + print_r(symfony_debug_backtrace()); +} + +register_shutdown_function('bt'); + +bar(); + +?> +--EXPECTF-- +Fatal error: Call to undefined function notexist() in %s on line %d +Array +( + [0] => Array + ( + [function] => bt + [args] => Array + ( + ) + + ) + + [1] => Array + ( + [file] => %s + [line] => %d + [function] => foo + [args] => Array + ( + ) + + ) + + [2] => Array + ( + [file] => %s + [line] => %d + [function] => bar + [args] => Array + ( + ) + + ) + +)