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

Function TestPrinterPrintNameName

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

Source from the content-addressed store, hash-verified

264}
265
266func TestPrinterPrintNameName(t *testing.T) {
267 o := bytes.NewBufferString("")
268
269 p := printer.NewPrinter(o)
270 p.Print(&name.Name{
271 Parts: []node.Node{
272 &name.NamePart{
273 Value: "Foo",
274 },
275 &name.NamePart{
276 Value: "Bar",
277 },
278 },
279 })
280
281 expected := "Foo\\Bar"
282 actual := o.String()
283
284 if expected != actual {
285 t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual)
286 }
287}
288
289func TestPrinterPrintNameFullyQualified(t *testing.T) {
290 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…