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

Function TestPrinterPrintLabel

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

Source from the content-addressed store, hash-verified

3872}
3873
3874func TestPrinterPrintLabel(t *testing.T) {
3875 o := bytes.NewBufferString("")
3876
3877 p := printer.NewPrinter(o)
3878 p.Print(&stmt.Label{
3879 LabelName: &node.Identifier{Value: "FOO"},
3880 })
3881
3882 expected := `FOO:`
3883 actual := o.String()
3884
3885 if expected != actual {
3886 t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual)
3887 }
3888}
3889
3890func TestPrinterPrintNamespace(t *testing.T) {
3891 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…