MCPcopy Create free account
hub / github.com/z7zmey/php-parser / TestPrinterPrintIncludeOnce

Function TestPrinterPrintIncludeOnce

printer/printer_test.go:1946–1960  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

1944}
1945
1946func TestPrinterPrintIncludeOnce(t *testing.T) {
1947 o := bytes.NewBufferString("")
1948
1949 p := printer.NewPrinter(o)
1950 p.Print(&expr.IncludeOnce{
1951 Expr: &scalar.String{Value: "'path'"},
1952 })
1953
1954 expected := `include_once 'path'`
1955 actual := o.String()
1956
1957 if expected != actual {
1958 t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual)
1959 }
1960}
1961
1962func TestPrinterPrintInstanceOf(t *testing.T) {
1963 o := bytes.NewBufferString("")

Callers

nothing calls this directly

Calls 3

PrintMethod · 0.95
NewPrinterFunction · 0.92
StringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…