Security update for Core, with self-updated composer
[yaffs-website] / vendor / nikic / php-parser / test / code / parser / stmt / namespace / nested.test
diff --git a/vendor/nikic/php-parser/test/code/parser/stmt/namespace/nested.test b/vendor/nikic/php-parser/test/code/parser/stmt/namespace/nested.test
new file mode 100644 (file)
index 0000000..840daff
--- /dev/null
@@ -0,0 +1,30 @@
+Nested namespaces are not allowed
+-----
+<?php
+namespace A {
+    namespace B {
+
+    }
+}
+-----
+Namespace declarations cannot be nested from 3:5 to 5:5
+array(
+    0: Stmt_Namespace(
+        name: Name(
+            parts: array(
+                0: A
+            )
+        )
+        stmts: array(
+            0: Stmt_Namespace(
+                name: Name(
+                    parts: array(
+                        0: B
+                    )
+                )
+                stmts: array(
+                )
+            )
+        )
+    )
+)
\ No newline at end of file