(t *testing.T)
| 94 | } |
| 95 | |
| 96 | func TestStaticCallRelative(t *testing.T) { |
| 97 | src := `<? namespace\Foo::bar();` |
| 98 | |
| 99 | expected := &node.Root{ |
| 100 | Position: &position.Position{ |
| 101 | StartLine: 1, |
| 102 | EndLine: 1, |
| 103 | StartPos: 3, |
| 104 | EndPos: 24, |
| 105 | }, |
| 106 | Stmts: []node.Node{ |
| 107 | &stmt.Expression{ |
| 108 | Position: &position.Position{ |
| 109 | StartLine: 1, |
| 110 | EndLine: 1, |
| 111 | StartPos: 3, |
| 112 | EndPos: 24, |
| 113 | }, |
| 114 | Expr: &expr.StaticCall{ |
| 115 | Position: &position.Position{ |
| 116 | StartLine: 1, |
| 117 | EndLine: 1, |
| 118 | StartPos: 3, |
| 119 | EndPos: 23, |
| 120 | }, |
| 121 | Class: &name.Relative{ |
| 122 | Position: &position.Position{ |
| 123 | StartLine: 1, |
| 124 | EndLine: 1, |
| 125 | StartPos: 3, |
| 126 | EndPos: 16, |
| 127 | }, |
| 128 | Parts: []node.Node{ |
| 129 | &name.NamePart{ |
| 130 | Position: &position.Position{ |
| 131 | StartLine: 1, |
| 132 | EndLine: 1, |
| 133 | StartPos: 13, |
| 134 | EndPos: 16, |
| 135 | }, |
| 136 | Value: "Foo", |
| 137 | }, |
| 138 | }, |
| 139 | }, |
| 140 | Call: &node.Identifier{ |
| 141 | Position: &position.Position{ |
| 142 | StartLine: 1, |
| 143 | EndLine: 1, |
| 144 | StartPos: 18, |
| 145 | EndPos: 21, |
| 146 | }, |
| 147 | Value: "bar", |
| 148 | }, |
| 149 | ArgumentList: &node.ArgumentList{ |
| 150 | Position: &position.Position{ |
| 151 | StartLine: 1, |
| 152 | EndLine: 1, |
| 153 | StartPos: 21, |
nothing calls this directly
no test coverage detected
searching dependent graphs…