summaryrefslogtreecommitdiff
path: root/Zend/tests/temporary_cleaning_007.phpt
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2015-07-10 03:46:57 +0300
committerDmitry Stogov <dmitry@zend.com>2015-07-10 03:46:57 +0300
commit3bb70fe2903acf2caf2600345f07943f34a3b23c (patch)
treecc8eda7cb3bab8c742bbbd9fafb6f3ce0584fdde /Zend/tests/temporary_cleaning_007.phpt
parentbafe9d8c306659ca0a6897951e5aac428a11fb58 (diff)
downloadphp-git-3bb70fe2903acf2caf2600345f07943f34a3b23c.tar.gz
Readded tests
Diffstat (limited to 'Zend/tests/temporary_cleaning_007.phpt')
-rw-r--r--Zend/tests/temporary_cleaning_007.phpt22
1 files changed, 22 insertions, 0 deletions
diff --git a/Zend/tests/temporary_cleaning_007.phpt b/Zend/tests/temporary_cleaning_007.phpt
new file mode 100644
index 0000000000..0e29ed6c33
--- /dev/null
+++ b/Zend/tests/temporary_cleaning_007.phpt
@@ -0,0 +1,22 @@
+--TEST--
+Exception inside a foreach loop with return
+--FILE--
+<?php
+class saboteurTestController {
+ public function isConsistent() { throw new \Exception(); }
+}
+
+$controllers = array(new saboteurTestController(),new saboteurTestController());
+foreach ($controllers as $controller) {
+ try {
+ if ($controller->isConsistent()) {
+ return $controller;
+ }
+ } catch (\Exception $e) {
+ echo "Exception\n";
+ }
+}
+?>
+--EXPECT--
+Exception
+Exception