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

Function TestPrintInclude

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

Source from the content-addressed store, hash-verified

1550}
1551
1552func TestPrintInclude(t *testing.T) {
1553 o := bytes.NewBufferString("")
1554
1555 p := printer.NewPrettyPrinter(o, " ")
1556 p.Print(&expr.Include{Expr: &scalar.String{Value: "'path'"}})
1557
1558 expected := `include 'path'`
1559 actual := o.String()
1560
1561 if expected != actual {
1562 t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual)
1563 }
1564}
1565
1566func TestPrintIncludeOnce(t *testing.T) {
1567 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…