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

Function TestPrinterPrintIdentifier

printer/printer_test.go:124–139  ·  view source on GitHub ↗

node

(t *testing.T)

Source from the content-addressed store, hash-verified

122// node
123
124func TestPrinterPrintIdentifier(t *testing.T) {
125 o := bytes.NewBufferString("")
126
127 p := printer.NewPrinter(o)
128 n := &node.Identifier{
129 Value: "test",
130 }
131 p.Print(n)
132
133 expected := `test`
134 actual := o.String()
135
136 if expected != actual {
137 t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual)
138 }
139}
140
141func TestPrinterPrintParameter(t *testing.T) {
142 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…