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

Function TestPrintIncludeOnce

printer/pretty_printer_test.go:1566–1578  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

1564}
1565
1566func TestPrintIncludeOnce(t *testing.T) {
1567 o := bytes.NewBufferString("")
1568
1569 p := printer.NewPrettyPrinter(o, " ")
1570 p.Print(&expr.IncludeOnce{Expr: &scalar.String{Value: "'path'"}})
1571
1572 expected := `include_once 'path'`
1573 actual := o.String()
1574
1575 if expected != actual {
1576 t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual)
1577 }
1578}
1579
1580func TestPrintInstanceOf(t *testing.T) {
1581 o := bytes.NewBufferString("")

Callers

nothing calls this directly

Calls 3

PrintMethod · 0.95
NewPrettyPrinterFunction · 0.92
StringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…