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

Function TestPrinterPrintInclude

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

Source from the content-addressed store, hash-verified

1928}
1929
1930func TestPrinterPrintInclude(t *testing.T) {
1931 o := bytes.NewBufferString("")
1932
1933 p := printer.NewPrinter(o)
1934 p.Print(&expr.Include{
1935 Expr: &scalar.String{Value: "'path'"},
1936 })
1937
1938 expected := `include 'path'`
1939 actual := o.String()
1940
1941 if expected != actual {
1942 t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual)
1943 }
1944}
1945
1946func TestPrinterPrintIncludeOnce(t *testing.T) {
1947 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…