Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / vendor / nikic / php-parser / test / code / parser / stmt / namespace / invalidName.test
1 Invalid namespace names
2 -----
3 <?php namespace self;
4 -----
5 Cannot use 'self' as namespace name from 1:17 to 1:20
6 array(
7     0: Stmt_Namespace(
8         name: Name(
9             parts: array(
10                 0: self
11             )
12         )
13         stmts: array(
14         )
15     )
16 )
17 -----
18 <?php namespace PARENT;
19 -----
20 Cannot use 'PARENT' as namespace name from 1:17 to 1:22
21 array(
22     0: Stmt_Namespace(
23         name: Name(
24             parts: array(
25                 0: PARENT
26             )
27         )
28         stmts: array(
29         )
30     )
31 )
32 -----
33 <?php namespace static;
34 -----
35 Syntax error, unexpected T_STATIC, expecting T_STRING or T_NS_SEPARATOR or '{' from 1:17 to 1:22
36 array(
37 )
38 -----
39 <?php use A as self;
40 -----
41 Cannot use A as self because 'self' is a special class name from 1:16 to 1:19
42 array(
43     0: Stmt_Use(
44         type: TYPE_NORMAL (1)
45         uses: array(
46             0: Stmt_UseUse(
47                 type: TYPE_UNKNOWN (0)
48                 name: Name(
49                     parts: array(
50                         0: A
51                     )
52                 )
53                 alias: Identifier(
54                     name: self
55                 )
56             )
57         )
58     )
59 )
60 -----
61 <?php use B as PARENT;
62 -----
63 Cannot use B as PARENT because 'PARENT' is a special class name from 1:16 to 1:21
64 array(
65     0: Stmt_Use(
66         type: TYPE_NORMAL (1)
67         uses: array(
68             0: Stmt_UseUse(
69                 type: TYPE_UNKNOWN (0)
70                 name: Name(
71                     parts: array(
72                         0: B
73                     )
74                 )
75                 alias: Identifier(
76                     name: PARENT
77                 )
78             )
79         )
80     )
81 )
82 -----
83 <?php use C as static;
84 -----
85 Syntax error, unexpected T_STATIC, expecting T_STRING from 1:16 to 1:21
86 array(
87 )