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

Function TestPrinterPrintStmtTraitMethodRef

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

Source from the content-addressed store, hash-verified

4204}
4205
4206func TestPrinterPrintStmtTraitMethodRef(t *testing.T) {
4207 o := bytes.NewBufferString("")
4208
4209 p := printer.NewPrinter(o)
4210 p.Print(&stmt.TraitMethodRef{
4211 Method: &node.Identifier{Value: "a"},
4212 })
4213
4214 expected := `a`
4215 actual := o.String()
4216
4217 if expected != actual {
4218 t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual)
4219 }
4220}
4221
4222func TestPrinterPrintStmtTraitMethodRefFull(t *testing.T) {
4223 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…