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

Function TestPrinterPrintNameNamePart

printer/printer_test.go:250–264  ·  view source on GitHub ↗

name

(t *testing.T)

Source from the content-addressed store, hash-verified

248// name
249
250func TestPrinterPrintNameNamePart(t *testing.T) {
251 o := bytes.NewBufferString("")
252
253 p := printer.NewPrinter(o)
254 p.Print(&name.NamePart{
255 Value: "foo",
256 })
257
258 expected := "foo"
259 actual := o.String()
260
261 if expected != actual {
262 t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual)
263 }
264}
265
266func TestPrinterPrintNameName(t *testing.T) {
267 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…