(t *testing.T)
| 1945 | } |
| 1946 | |
| 1947 | func TestPrintStaticPropertyFetch(t *testing.T) { |
| 1948 | o := bytes.NewBufferString("") |
| 1949 | |
| 1950 | p := printer.NewPrettyPrinter(o, " ") |
| 1951 | p.Print(&expr.StaticPropertyFetch{ |
| 1952 | Class: &node.Identifier{Value: "Foo"}, |
| 1953 | Property: &expr.Variable{VarName: &node.Identifier{Value: "bar"}}, |
| 1954 | }) |
| 1955 | |
| 1956 | expected := `Foo::$bar` |
| 1957 | actual := o.String() |
| 1958 | |
| 1959 | if expected != actual { |
| 1960 | t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual) |
| 1961 | } |
| 1962 | } |
| 1963 | |
| 1964 | func TestPrintTernary(t *testing.T) { |
| 1965 | o := bytes.NewBufferString("") |
nothing calls this directly
no test coverage detected
searching dependent graphs…