Added test case for issue #1126
authorTugdual Saunier <tugdual.saunier@gmail.com>
Tue, 23 Jul 2013 19:36:05 +0000 (21:36 +0200)
committerTugdual Saunier <tugdual.saunier@gmail.com>
Tue, 23 Jul 2013 19:36:05 +0000 (21:36 +0200)
test/Twig/Tests/Fixtures/regression/issue_1126.test [new file with mode: 0644]

diff --git a/test/Twig/Tests/Fixtures/regression/issue_1126.test b/test/Twig/Tests/Fixtures/regression/issue_1126.test
new file mode 100644 (file)
index 0000000..846eb56
--- /dev/null
@@ -0,0 +1,15 @@
+--TEST--
+C extension causes php5-fpm to crash
+--TEMPLATE--
+{{ data.test1 }}
+--DATA--
+class test
+{
+    public function __isset($key) {
+        throw new Exception("Hey! Don't try to isset me!");
+    }
+}
+
+return array('data' => new test())
+--EXCEPTION--
+Twig_Error_Runtime: An exception has been thrown during the rendering of a template ("Hey! Don't try to isset me!") in "index.twig" at line 2.