(t *testing.T)
| 17 | ) |
| 18 | |
| 19 | func TestClassConstFetch(t *testing.T) { |
| 20 | src := `<? Foo::Bar;` |
| 21 | |
| 22 | expected := &node.Root{ |
| 23 | Position: &position.Position{ |
| 24 | StartLine: 1, |
| 25 | EndLine: 1, |
| 26 | StartPos: 3, |
| 27 | EndPos: 12, |
| 28 | }, |
| 29 | Stmts: []node.Node{ |
| 30 | &stmt.Expression{ |
| 31 | Position: &position.Position{ |
| 32 | StartLine: 1, |
| 33 | EndLine: 1, |
| 34 | StartPos: 3, |
| 35 | EndPos: 12, |
| 36 | }, |
| 37 | Expr: &expr.ClassConstFetch{ |
| 38 | Position: &position.Position{ |
| 39 | StartLine: 1, |
| 40 | EndLine: 1, |
| 41 | StartPos: 3, |
| 42 | EndPos: 11, |
| 43 | }, |
| 44 | Class: &name.Name{ |
| 45 | Position: &position.Position{ |
| 46 | StartLine: 1, |
| 47 | EndLine: 1, |
| 48 | StartPos: 3, |
| 49 | EndPos: 6, |
| 50 | }, |
| 51 | Parts: []node.Node{ |
| 52 | &name.NamePart{ |
| 53 | Position: &position.Position{ |
| 54 | StartLine: 1, |
| 55 | EndLine: 1, |
| 56 | StartPos: 3, |
| 57 | EndPos: 6, |
| 58 | }, |
| 59 | Value: "Foo", |
| 60 | }, |
| 61 | }, |
| 62 | }, |
| 63 | ConstantName: &node.Identifier{ |
| 64 | Position: &position.Position{ |
| 65 | StartLine: 1, |
| 66 | EndLine: 1, |
| 67 | StartPos: 8, |
| 68 | EndPos: 11, |
| 69 | }, |
| 70 | Value: "Bar", |
| 71 | }, |
| 72 | }, |
| 73 | }, |
| 74 | }, |
| 75 | } |
| 76 |
nothing calls this directly
no test coverage detected
searching dependent graphs…