(t *testing.T)
| 88 | } |
| 89 | |
| 90 | func TestFunctionCallRelative(t *testing.T) { |
| 91 | src := `<? namespace\foo();` |
| 92 | |
| 93 | expected := &node.Root{ |
| 94 | Position: &position.Position{ |
| 95 | StartLine: 1, |
| 96 | EndLine: 1, |
| 97 | StartPos: 3, |
| 98 | EndPos: 19, |
| 99 | }, |
| 100 | Stmts: []node.Node{ |
| 101 | &stmt.Expression{ |
| 102 | Position: &position.Position{ |
| 103 | StartLine: 1, |
| 104 | EndLine: 1, |
| 105 | StartPos: 3, |
| 106 | EndPos: 19, |
| 107 | }, |
| 108 | Expr: &expr.FunctionCall{ |
| 109 | Position: &position.Position{ |
| 110 | StartLine: 1, |
| 111 | EndLine: 1, |
| 112 | StartPos: 3, |
| 113 | EndPos: 18, |
| 114 | }, |
| 115 | Function: &name.Relative{ |
| 116 | Position: &position.Position{ |
| 117 | StartLine: 1, |
| 118 | EndLine: 1, |
| 119 | StartPos: 3, |
| 120 | EndPos: 16, |
| 121 | }, |
| 122 | Parts: []node.Node{ |
| 123 | &name.NamePart{ |
| 124 | Position: &position.Position{ |
| 125 | StartLine: 1, |
| 126 | EndLine: 1, |
| 127 | StartPos: 13, |
| 128 | EndPos: 16, |
| 129 | }, |
| 130 | Value: "foo", |
| 131 | }, |
| 132 | }, |
| 133 | }, |
| 134 | ArgumentList: &node.ArgumentList{ |
| 135 | Position: &position.Position{ |
| 136 | StartLine: 1, |
| 137 | EndLine: 1, |
| 138 | StartPos: 16, |
| 139 | EndPos: 18, |
| 140 | }, |
| 141 | }, |
| 142 | }, |
| 143 | }, |
| 144 | }, |
| 145 | } |
| 146 | |
| 147 | php7parser := php7.NewParser([]byte(src), "7.4") |
nothing calls this directly
no test coverage detected
searching dependent graphs…