diff options
Diffstat (limited to 'Zend/tests/exception_009.phpt')
| -rw-r--r-- | Zend/tests/exception_009.phpt | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/Zend/tests/exception_009.phpt b/Zend/tests/exception_009.phpt new file mode 100644 index 0000000..b22b3aa --- /dev/null +++ b/Zend/tests/exception_009.phpt @@ -0,0 +1,28 @@ +--TEST-- +Testing exception properties +--FILE-- +<?php + +class my_file +{ + public function __toString() + { + return "somebuildfilename" ; + } +} + +class my_exception extends exception +{ + public function __construct() + { + $this->message = new stdclass ; + $this->file = new my_file ; + $this->line = "12" ; + } +} + +throw new my_exception; + +?> +--EXPECT-- +Catchable fatal error: Object of class stdClass could not be converted to string in Unknown on line 0 |
