(t *testing.T)
| 2731 | } |
| 2732 | |
| 2733 | func TestCommentEndFile(t *testing.T) { |
| 2734 | src := `<? //comment at the end)` |
| 2735 | |
| 2736 | expected := &node.Root{ |
| 2737 | Position: &position.Position{ |
| 2738 | StartLine: -1, |
| 2739 | EndLine: -1, |
| 2740 | StartPos: -1, |
| 2741 | EndPos: -1, |
| 2742 | }, |
| 2743 | Stmts: []node.Node{}, |
| 2744 | } |
| 2745 | |
| 2746 | php7parser := php7.NewParser([]byte(src), "7.4") |
| 2747 | php7parser.Parse() |
| 2748 | actual := php7parser.GetRootNode() |
| 2749 | assert.DeepEqual(t, expected, actual) |
| 2750 | |
| 2751 | php5parser := php5.NewParser([]byte(src), "5.6") |
| 2752 | php5parser.Parse() |
| 2753 | actual = php5parser.GetRootNode() |
| 2754 | assert.DeepEqual(t, expected, actual) |
| 2755 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…