Security update for Core, with self-updated composer
[yaffs-website] / vendor / nikic / php-parser / test / code / parser / stmt / class / conditional.test
diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/class/conditional.test b/vendor/nikic/php-parser/test/code/parser/stmt/class/conditional.test
new file mode 100644 (file)
index 0000000..e18090c
--- /dev/null
@@ -0,0 +1,33 @@
+Conditional class definition
+-----
+<?php
+
+if (true) {
+    class A {}
+}
+-----
+array(
+    0: Stmt_If(
+        cond: Expr_ConstFetch(
+            name: Name(
+                parts: array(
+                    0: true
+                )
+            )
+        )
+        stmts: array(
+            0: Stmt_Class(
+                flags: 0
+                name: A
+                extends: null
+                implements: array(
+                )
+                stmts: array(
+                )
+            )
+        )
+        elseifs: array(
+        )
+        else: null
+    )
+)
\ No newline at end of file