(t *testing.T)
| 1918 | } |
| 1919 | |
| 1920 | func TestPrintStaticCall(t *testing.T) { |
| 1921 | o := bytes.NewBufferString("") |
| 1922 | |
| 1923 | p := printer.NewPrettyPrinter(o, " ") |
| 1924 | p.Print(&expr.StaticCall{ |
| 1925 | Class: &node.Identifier{Value: "Foo"}, |
| 1926 | Call: &node.Identifier{Value: "bar"}, |
| 1927 | ArgumentList: &node.ArgumentList{ |
| 1928 | Arguments: []node.Node{ |
| 1929 | &node.Argument{ |
| 1930 | Expr: &expr.Variable{VarName: &node.Identifier{Value: "a"}}, |
| 1931 | }, |
| 1932 | &node.Argument{ |
| 1933 | Expr: &expr.Variable{VarName: &node.Identifier{Value: "b"}}, |
| 1934 | }, |
| 1935 | }, |
| 1936 | }, |
| 1937 | }) |
| 1938 | |
| 1939 | expected := `Foo::bar($a, $b)` |
| 1940 | actual := o.String() |
| 1941 | |
| 1942 | if expected != actual { |
| 1943 | t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual) |
| 1944 | } |
| 1945 | } |
| 1946 | |
| 1947 | func TestPrintStaticPropertyFetch(t *testing.T) { |
| 1948 | o := bytes.NewBufferString("") |
nothing calls this directly
no test coverage detected
searching dependent graphs…