cvs: ZendEngine2 /tests exception_007.phpt exception_008.phpt gc_030.phpt
| From: | Marcus Boerger | Date: | Sun, 13 Jul 2008 21:37:27 +0000 |
| Subject: | cvs: ZendEngine2 /tests exception_007.phpt exception_008.phpt gc_030.phpt | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-6886@lists.php.net to get a copy of this message | ||
helly Sun Jul 13 21:37:27 2008 UTC
Added files:
/ZendEngine2/tests exception_007.phpt exception_008.phpt
Modified files:
/ZendEngine2/tests gc_030.phpt
Log:
- Fix/add tests
http://cvs.php.net/viewvc.cgi/ZendEngine2/tests/gc_030.phpt?r1=1.2&r2=1.3&diff_format=u
Index: ZendEngine2/tests/gc_030.phpt
diff -u ZendEngine2/tests/gc_030.phpt:1.2 ZendEngine2/tests/gc_030.phpt:1.3
--- ZendEngine2/tests/gc_030.phpt:1.2 Tue Jul 8 08:16:18 2008
+++ ZendEngine2/tests/gc_030.phpt Sun Jul 13 21:37:27 2008
@@ -18,4 +18,14 @@
gc_collect_cycles();
?>
--EXPECTF--
-Fatal error: Ignoring exception from foo::__destruct() while an exception is already active
(Uncaught Exception in %sgc_030.php on line %d) in %sgc_030.php on line %d
+Fatal error: Uncaught exception 'Exception' with message 'foobar' in
%sgc_030.php:%d
+Stack trace:
+#0 [internal function]: foo->__destruct()
+#1 %sgc_030.php(%d): gc_collect_cycles()
+#2 {main}
+
+Next exception 'Exception' with message 'foobar' in %sgc_030.php:%d
+Stack trace:
+#0 %sgc_030.php(%d): foo->__destruct()
+#1 {main}
+ thrown in %sgc_030.php on line %d
http://cvs.php.net/viewvc.cgi/ZendEngine2/tests/exception_007.phpt?view=markup&rev=1.1
Index: ZendEngine2/tests/exception_007.phpt
+++ ZendEngine2/tests/exception_007.phpt
--TEST--
Setting previous exception
--FILE--
<?php
try {
try {
throw new Exception("First", 1, new Exception("Another", 0, NULL));
}
catch (Exception $e) {
throw new Exception("Second", 2, $e);
}
}
catch (Exception $e) {
throw new Exception("Third", 3, $e);
}
?>
===DONE===
--EXPECTF--
Fatal error: Uncaught exception 'Exception' with message 'Another' in
%sexception_007.php:%d
Stack trace:
#0 {main}
Next exception 'Exception' with message 'First' in %sexception_007.php:%d
Stack trace:
#0 {main}
Next exception 'Exception' with message 'Second' in %sexception_007.php:%d
Stack trace:
#0 {main}
Next exception 'Exception' with message 'Third' in %sexception_007.php:%d
Stack trace:
#0 {main}
thrown in %sexception_007.php on line %d
http://cvs.php.net/viewvc.cgi/ZendEngine2/tests/exception_008.phpt?view=markup&rev=1.1
Index: ZendEngine2/tests/exception_008.phpt
+++ ZendEngine2/tests/exception_008.phpt
--TEST--
Exception in __destruct while exception is pending
--FILE--
<?php
class TestFirst
{
function __destruct() {
throw new Exception("First");
}
}
class TestSecond
{
function __destruct() {
throw new Exception("Second");
}
}
$ar = array(new TestFirst, new TestSecond);
unset($ar);
?>
===DONE===
--EXPECTF--
Fatal error: Uncaught exception 'Exception' with message 'First' in
%sexception_008.php:%d
Stack trace:
#0 %sexception_008.php(%d): TestFirst->__destruct()
#1 {main}
Next exception 'Exception' with message 'Second' in %sexception_008.php:%d
Stack trace:
#0 %sexception_008.php(%d): TestSecond->__destruct()
#1 {main}
thrown in %sexception_008.php on line %d