diff vendor/nikic/php-parser/test/code/parser/stmt/namespace/nested.test @ 0:4c8ae668cc8c

Initial import (non-working)
author Chris Cannam
date Wed, 29 Nov 2017 16:09:58 +0000
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/vendor/nikic/php-parser/test/code/parser/stmt/namespace/nested.test	Wed Nov 29 16:09:58 2017 +0000
@@ -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