diff options
author | Dmitry Stogov <dmitry@zend.com> | 2015-04-01 15:54:03 +0300 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2015-04-01 15:54:03 +0300 |
commit | 0cad725886dc620632f3aa413c1e944411465cd0 (patch) | |
tree | 1afb919bac835888f3b71e9ab08d0c659ce0280e /Zend/tests/exception_016.phpt | |
parent | 8c031a3f95442b68625394962fa1b0279d182f62 (diff) | |
download | php-git-0cad725886dc620632f3aa413c1e944411465cd0.tar.gz |
Convert fatal errors into EngineExceptions
Diffstat (limited to 'Zend/tests/exception_016.phpt')
-rw-r--r-- | Zend/tests/exception_016.phpt | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Zend/tests/exception_016.phpt b/Zend/tests/exception_016.phpt new file mode 100644 index 0000000000..ffa0a45b84 --- /dev/null +++ b/Zend/tests/exception_016.phpt @@ -0,0 +1,16 @@ +--TEST-- +Exceptions on improper usage of $this +--FILE-- +<?php +try { + $this->foo(); +} catch (EngineException $e) { + echo "\nException: " . $e->getMessage() . " in " , $e->getFile() . " on line " . $e->getLine() . "\n"; +} + +$this->foo(); +?> +--EXPECTF-- +Exception: Using $this when not in object context in %sexception_016.php on line %d + +Fatal error: Using $this when not in object context in %sexception_016.php on line %d |