Security update for Core, with self-updated composer
[yaffs-website] / vendor / nikic / php-parser / test / code / parser / stmt / tryWithoutCatch.test
diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/tryWithoutCatch.test b/vendor/nikic/php-parser/test/code/parser/stmt/tryWithoutCatch.test
new file mode 100644 (file)
index 0000000..ad113d9
--- /dev/null
@@ -0,0 +1,27 @@
+Cannot use try without catch or finally
+-----
+<?php
+
+try {
+    foo();
+}
+-----
+Cannot use try without catch or finally from 3:1 to 5:1
+array(
+    0: Stmt_TryCatch(
+        stmts: array(
+            0: Expr_FuncCall(
+                name: Name(
+                    parts: array(
+                        0: foo
+                    )
+                )
+                args: array(
+                )
+            )
+        )
+        catches: array(
+        )
+        finally: null
+    )
+)
\ No newline at end of file